David, thanks for the quick reply. > Well, the server using it, in a slightly modified version from that > message, remains in production, and has been continuously since July > of 2007. So it's certainly worked for its intended purpose for me - > that is, offloading the SA database I/O to a dedicated thread to avoid > any possible blocking in the main Twisted reactor thread.
That's good to hear. > Probably the biggest change between my message and putting it in > production was to stop using the ORM. Yes, I've read other cautionary tales about mixing Twisted and the ORM. Fortunately, I don't need it for my immediate needs. > I always considered it a solution to a very specific usage pattern > that worked for my particular case, but not necessarily something > generalized enough for inclusion elsewhere. It's pretty brute force; > no ORM support (well, or be very careful if using the ORM), and each > operation queued to the database thread needs to be self-contained > (since ops from different twisted deferred chains could interleave > over the same database connection). But within those constraints it > works just fine. Hmmm, Could you elaborate a bit about the "self-contained"? I do have some cases where I fire off a deferredList with several (independent) queries in it. Might that be problematic? > > As you can see from that older message, there's not too much involved. > It's basically a standard worker thread pattern using queues, with > only a single worker thread, some knowledge about the SA engine and > the use of Twisted Deferreds to return the result. Yes, it is nice and simple and clean. It shouldn't be hard to work with, and extend if needed. Thanks again, -- Don Dwiggins Advanced Publishing Technology --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
