Re: [sprog-users] Re: DBI Gear
Status: Alpha
Brought to you by:
grantm
From: Matthew K. <df...@ya...> - 2005-07-01 11:42:44
|
--- Grant McLean <gr...@mc...> wrote: > On Thu, 2005-06-30 at 19:45 +1000, Matthew Keene > wrote: > > >Obviously Sprog needs the ability to source data > from > > >a database via DBI. > > > > I'm trying to write one at the moment. > > Great! (See I said it was an obvious need). > I've got a synchronous DBIGear working, I'd appreciate any comments (I'll attach it here). I'm working on a design which will allow the query to run asynchronously, I'm going to start a worker process which will use sockets to communicate back to the caller. This is apparently what POE does to simulate asynchronous database calls, and I figure that it might be a bit easier to have structured (and potentially binary) communication than IPC::Open*. I'm a bit concerned that starting a worker process and using interprocess communication (of some form) is quite cumbersome and error-prone (not to mention slower), and I'll probably end up making it a user-selectable option to run it asynchronously or not. This gives the user the ability to run it in process if they're confident that the select statement will return in a reasonable amount of time or are willing to wait for it. It seems a bit like the tail wagging the dog if the whole thing has to run out of process just so someone can click the stop button, when this is probably the exceptional case. Your thoughts ? ____________________________________________________ Do you Yahoo!? Try Yahoo! Photomail Beta: Send up to 300 photos in one email! http://au.photomail.mail.yahoo.com |