[gambit-list] Re: Calling blocking C libraries from scheme threads

Johannes Groedem johs+n at ifi.uio.no
Fri Oct 28 06:53:41 EDT 2005


* Christian <christian at pflanze.mine.nu>:

>> It could be that the best solution is to just implement the
>> protocol in Scheme.
> It might be tempting to try this and see how fast Gambit can get with
> it. And see whether one is able to grok and imitate the protocol. But
> I think that doesn't scale in two ways: first, if Mysql is extended
> with new functionality, that interface might be going to break much
> sooner than if it did use the C libs.

Depends on whether they arbitrarily change the protocol so that client
C libraries always have to be the same version as the server.  I'd
guess they probably don't.  PostgreSQL, for one, does not seem to do
this.  Anyway, if they extend MySQL with new functionality, you may
have to change the C interface anyway.

> Second, there are more libraries than only this one. Imagine if you
> could run all of Perl's CPAN without change and not block any other
> scheme thread.

You could always fork new Scheme processes.  Since they can only talk
to their parent, you could probably safely use read/eval/etc to
facilitate communication between the processes.

-- 
Johannes Groedem <OpenPGP: 5055654C>




More information about the Gambit-list mailing list