squeak to meet databases
Avi Bryant
avi at beta4.com
Thu Aug 5 22:50:21 UTC 2004
On Aug 5, 2004, at 11:30 AM, lex at cc.gatech.edu wrote:
> Kamil Kukura <kamk at volny.cz> wrote:
>> When trying to attract web developers from environments such as PHP,
>> ASP
>> or JSP, I'm badly missing a thing to show as how Squeak deals with
>> external databases. Perhaps best way to connect to any DB is to use
>> ODBC
>> which scares me as it relies on FFI
>> <http://minnow.cc.gatech.edu/squeak/2424>
>
> FFI seems the proper way to talk to ODBC, and ODBC seems like a direct
> way to get portable database access.
>
> Is fear the only reason not to use FFI, or is there a technical problem
> as well? Have you tried it? Maybe we just need to smooth the process
> of
> getting everything set up?
In this case there is actually a sound technical reason not to use FFI,
which is that FFI can only support blocking calls, and you really don't
want the VM blocking on something as I/O bound as a database query. It
means you effectively can't use ODBC in a web setting, or anywhere that
you are going to have lots of concurrent queries. It's useful for
batch work (massaging/importing/exporting data) but that's about it.
The right thing to do would be to write a plugin that either used an
async interface to ODBC (I can't imagine it doesn't provide one), or in
the worst case spawns a separate thread for each query.
More information about the Squeak-dev
mailing list
|