At 2:48 Uhr +0200 12.06.2006, Arto Bendiken wrote:
Howdy,
I recently needed to retrieve some data from MySQL with Gambit. I wasn't able to find an MySQL FFI for Gambit,
I don't know about a direct mysql binding either. But as I've written to this list earlier, one can also get at databases by using my Perl bindings "gperl" (and actually I'm using this now to access mysql).
Besides not requiring Perl, your approach will have the advantage, that when using multiple gambit threads running queries in parallel, one thread will not block the others, as is currently the case with the perl interface (and C bindings in general (unless special precautions are taken, possibly)).
I'd like to mention that I've continued development of "gperl", it can now read/write/create perl hashes. I'll release it when I find time to clean it up a bit; if anyone is interested sooner, write to me.
It would be interesting to know about the efficiency of both approaches. I'm also thinking about implementing bindings to postgres, which has a client library that allows handling connections asynchronously, which could solve the concurrency problem. (And writing direct bindings has the advantage that using real prepared statements become possible, something which at least Perl's DBD::mysql doesn't currently use.)
Christian.