[PD] pyext + pygresql vs sqlsingle : PHP + MySQL !

Alexandre Quessy listes at sourcelibre.com
Mon Nov 7 20:57:12 CET 2005

Le 05-11-07, à 14:47, carmen a écrit :

> On Mon, Nov 07, 2005 at 07:30:28PM +0000, Jamie Bullock wrote:
>> Dear list,
>> I need to insert around 5 sets of 40 values, per second from PD into a
>> postgresql database (both on the same machine). I can see two options 
>> -
>> pyext + pygresql or sqlsingle.
>>> From a brief glance at both it looks like the Python route would be
>> better because sqlsingle introduces a lot of overhead
> and so does python. why not just open up a pipe (once per session) to 
> the daemon and stream the commands over plaintext. ive not used 
> postgres but mysql has something similar, you just terminate the 
> message with a ";" same as pd..
>> opening and
>> closing the connection, and vacuuming the db between writes.
>> However, perhaps sqlsingle could handle the task on a modern machine
>> (Centrino 1.6GHz)? This would probably save me some time getting the
>> Python stuff working? Does anyone have any advice either way before I
>> start with this?
> if youre generating a lot of symbols from the patch, to use as text 
> for queries, youre going to incur ram leakage, due to the fact that PD 
> has no 'string' type, just a never-deallocated symbol table..
> depending on how simple your database needs are, maybe you can use 
> Pool or PDContainer instead...although theyre certainly a bit less 
> flexible in terms of select-statement-esque things they can do the 
> basics like retrieve via ID, next/prev, all, 'namespaces' etc..

Also, if you are interested, I just wrote a PHP class to send and 
receive messages to and from PD. It is very easy to code in PHP, so 
this may be an option for your project. Let me know if you want it. I 
should post it on my web site soon....

| Alexandre Quessy  @  Montréal | http://www.sourcelibre.com/puredata/ |

More information about the Pd-list mailing list