At 15:45 Uhr +0200 18.10.2005, Johannes Groedem wrote:
The libraries often have provisions for this. See for example PostgreSQL's client library and its PQconsumeInput, PQisBusy, etc. But I guess the C libraries you're using don't support this, then?
The MySQL client library doesn't seem to support this.
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. 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.
Christian.
Afficher les réponses par date
* Christian christian@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.