Login  Register

Re: Databases for Pharo that do not use FFI

Posted by Mariano Martinez Peck on Aug 10, 2013; 3:42pm
URL: https://forum.world.st/Databases-for-Pharo-that-do-not-use-FFI-tp4703117p4703123.html




On Sat, Aug 10, 2013 at 10:44 AM, <[hidden email]> wrote:
Hello

I have been tinkering with Pharo long enough now to contemplate writing a "serious" applications with it. An important consideration is databases. I have been looking at SQLite but realise since it works through FFI it probably blocks the VM whilst processing a query. Is this correct?

Yes. 
 

VoyageMongo looks interesting. PostgreSQL is supported too. Do either of
these work through FFI?


Both Mongo and PostgreSQL Native Driver (implemented in Smalltalk), end up using sockets (no FFI), so from what I know, they do not lock the whole VM as with FFI. 

OpenDBXDriver uses OpenDBX library (using FFI) but at least OpenDBX supports async queries when the database backend supports them. That means that from Pharo we do a kind of busy waiting allowing other processes to be executed. But if the backend doesn't support async queries, then yes, OpenDBX will lock the Pharo VM while the query is being processed.

I can give more details about this busy waiting in DBXTalk if you want. 

Cheers,   
 
Many thanks in advance.




--
Mariano
http://marianopeck.wordpress.com