|
From: J-P L. <sql...@si...> - 2003-08-26 17:51:26
|
Ian Bicking wrote: > I don't think SQLObject can work in Twisted. Twisted uses an async > model, and SQLObject blocks all the time (like when transparently > doing database queries), which would bring Twisted to a halt until the > query is finished (which you might not even notice until you have > concurrent requests). I suppose you could wrap every SQLObject > attribute or method access in Twisted's threading stuff to avoid the > blocking, but I don't know if SQLObject would feel very convenient > after doing that. (I think the same blocking problem applies to > CherryPy, but I believe there's also a way to configure it to use a > thread for each request) Hmm... sorry to hear that. I can't get CherryPy's threading or forking to work with SQLObject. Threading hangs sometimes, and forking crashes the server. > Because of async, when you use Twisted you can't use most normal > Python libraries. They are in a world of their own, at least if you > want to use Twisted style. They do have an ORM of their own. > > I suppose you could use it if you moved to a different thread right > away in your request, then you wouldn't have to guard every SQLObject > attribute access. I see. Sounds like too much trouble. Are there other suggestions for a web app framework that would work well? Thanks. -- J-P |