Re: [fpc-pascal] Win64 SEH patch fixes some Firebird embedded bugs

2012-06-22 Thread Reinier Olislagers
On 21-6-2012 11:39, michael.vancann...@wisa.be wrote:
> On Thu, 21 Jun 2012, Reinier Olislagers wrote:
>> Thought I'd let everybody know in case they run into Firebird x64
>> (embedded) problems on Windows and to indicate that implementing the SEH
>> patch might be a good idea...
> 
> Well, I was going to test the above bugs and if they fixed the issue,
> recommend to enable SEH by default on Win64.

Recommend away, I'd say ;)

Thanks,
Reinier
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE : [fpc-pascal] Postgresql Concurrent Transactions

2012-06-22 Thread Ludo Brands
 

Each manager thread has its own Connection, Transaction, and TQuery.
Each manager can handle potentially thousands of sockets
Each server instance (1 process) can have up to ~100 manager threads.


Each Manager executes socket "commands" that translate at some point, into a
Database, Select, Update, or Delete.


My current problem: 
If a user updates a table by uploading large a video (say about 200+MB)  the
sql server locks pretty much every table and prevents other sockets which
during the SQL execution.  This is true for Delete and Update as of v9.1.

Are the tables locked or is the server just slow? What does 'select * from
pg_catalog.pg_locks where granted is false' return? For a query that lists
interdependent lock information see

http://wiki.postgresql.org/wiki/Lock_dependency_information.


Implications.  Parallel commands executed on other threads aren't able to
execute b/c the postgresql server just sits there waiting for the update
transaction to complete.   PostgreSQL is locking all subsequent calls to
even other tables.


Remediation: Memory barriers are already in place to ensure that other
threads don't access the TConnection,TQuery or other things during the
problematic transaction.  Is there a way to use specify a SHARE mode in
transactions for TPostgres component?

That I don't understand. You started with each thread having its own
Tconnection,TTransaction, Tquery. Here you say you put a memory barrier to
stop access to Tconnection,Tquery from other threads. 
"During the problematic transaction": is this a one query transaction or do
you have a lot of queries on multiple tables in the transaction, triggers
included? What is your isolation level for these transactions?
What exactly do you want to share in transactions for TPostgres component?
How are TPostgres components related to a server locking tables?  


How have anyone who've encountered this problem solved this issue?  Any
feedback is welcome. 
 

I haven't run into this problem yet but some general advise:
1) Determine what the exact cause of the lock is before implementing
remedies.   
2) The postgresql components make a lot of connections. When serving that
many clients, you will probably benefit from connection pooling. Look at
something like pgpool-II  http://pgpool.projects.postgresql.org/.
3) Putting 200MB files in a database is a bad idea
 
Ludo
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Adding method dynamically to a class

2012-06-22 Thread Jorge Aldo G. de F. Junior
Use event properties (Properties to a procedural type)

Adding completely free methods to a class makes no sense.

By free i mean a method that has no clear signature (parameters and
result type) because calling them will be a nightmare (You will have
to do the compiler work and build your own parameter passing and
return type system).

This is usually done in interpreters but what you describe doesnt
sound like a interpreter.

2012/6/21 ik :
> On Wed, Jun 20, 2012 at 2:15 PM, Inoussa OUEDRAOGO 
> wrote:
>>
>> > Think of a plug-able system.  I have an engine, and code to execute.
>> > Instead of compile everything to an ELF/PE, I place code on dynamic
>> > shard
>> > library, and load it on run time when needed.
>> >
>> > The idea is that the engine will not be rewritten for every new request
>> > (that comes often), because it's logic (almost) never changes, but to
>> > load
>> > code on demand that often changes, provide additional functions, changes
>> > of
>> > logic, bug fixes etc...
>>
>> WST library server implementation could be a elegant solution : it is
>> web-services that are
>> locally located in dynamic library(DLL)/shared object(so) instead of
>> being remote. The main
>>  executable acts as client while the server's implementation as
>> provided as shared objects.
>> No TCP is used, only memory through the WST's library protocol. No
>> SOAP serialization
>> as you can use the WST's custom binary messaging format that is very fast.
>>
>> To resume :
>>  * The main executable defines a WSDL schema that contains the types
>> (think of this as IDL)
>>  * The servers implement the service exposed in the schema.
>>  * The main executable loads the servers using the library protocol
>>
>> Main benefits are :
>>  * much larger type system available (wsdl, WST contains a type library
>> editor)
>>  * you could later even add remote servers without changing your main
>> application,
>>    just create the service with the desired location parameters.
>>
>
> Thank you, I'll check it out. My "problem" is something like with WDSL idea.
>
>
>>
>>
>>
>> --
>> Inoussa O.
>
>
> Ido
>
>>
>> ___
>> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
>
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] AUTO: Luca Manganelli è assente dall'ufficio

2012-06-22 Thread luca_manganelli


Sono fuori dall'ufficio da Ven 22/06/2012 fino a Lun 16/07/2012.




Nota: Questa è una risposta automatizzata al messaggio  "Re: [fpc-pascal]
Adding method dynamically to a class" inviata il 22/06/2012 15.25.21.

Questa è l'unica notifica che verrà ricevuta mentre la persona è assente.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] encryption and decryption

2012-06-22 Thread Rainer Stratmann
Does someone know how to do encryption and decryption with keys?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] encryption and decryption

2012-06-22 Thread Jorge Aldo G. de F. Junior
Theres a blowfish encryption system in freepascal

http://www.freepascal.org/docs-html/fcl/blowfish/index.html

2012/6/22 Rainer Stratmann :
> Does someone know how to do encryption and decryption with keys?
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] DOM and namespaces with prefix

2012-06-22 Thread Daniel Gaspary
On Tue, Jun 19, 2012 at 10:11 AM, Torsten Bonde Christiansen
 wrote:
>  DDIInstance := XMLDoc.CreateElementNS('ddi:instance:3_0', 'DDIInstance');
>  DDIInstance.Prefix := 'ns1';        // this gives me:  xmlns:ns1="ddi:instance:3_0"> which is great.
>
>  // now I would like to expand with eg: xmlns:a="ddi:archive:3_0"
>  Attr := XMLDoc.CreateAttributeNS('ddi:archive:3_0', 'huh');
>  Attr.Prefix := 'a';
>  DDIInstance.SetAttributeNode(Attr);   // but this gives:  xmlns:ns1="ddi:instance:3_0" xmlns:a="ddi:archive:3_0" a:huh=""/>

> How can i get the "xmlns:a="ddi:archive:3_0" without the additional
> attribute AND maintain the namespace + prefix in later elements?

I believe that the solution(given by Sergei Gorelkin at [1]) is:

DDIInstance.SetAttributeNS('ddi:archive:3_0','xmlns:a','ddi:archive:3_0');

[1] http://bugs.freepascal.org/view.php?id=22299#c60652
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] encryption and decryption

2012-06-22 Thread silvioprog
2012/6/22 Jorge Aldo G. de F. Junior :
> Theres a blowfish encryption system in freepascal
>
> http://www.freepascal.org/docs-html/fcl/blowfish/index.html
>
> 2012/6/22 Rainer Stratmann :
>> Does someone know how to do encryption and decryption with keys?

Hellow guys,

How to use TBlowFishEnCryptStream? Is there any example for mortals? :)

-- 
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal