[Twisted-Python] twisted application server

alex clemesha clemesha at gmail.com
Wed Feb 27 18:37:47 EST 2008

On Wed, Feb 27, 2008 at 3:46 AM, <glyph at divmod.com> wrote:

> On 11:11 am, coder_gus at lavabit.com wrote:
> >So, my question is: is this kind of architecture good to implement?
> >(asynchronous server and threaded workers)
> You might want to consider using process workers instead of thread
> workers, using spawnProcess and a simple control protocol.  This is
> easier to debug, since threads are painful to figure out, and it also
> scales better - you escape python's GIL and can take advantage of
> multiple cores, but even if it weren't for that, you can switch
> spawnProcess to some kind of remote connection API and run your
> processes remotely.

Would you say that this method of using a separate process instead of
threads to do work also is possibly good for database operations?

I'm always reading 'beware of threads' ;) with respect to Twisted,
so using a very simple control protocol to manage a separate
dedicate database process might be better than
relying on the threading that 'adbapi' uses?

Any comments on this would be appreciated.


> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20080227/1e9802d9/attachment.htm 

More information about the Twisted-Python mailing list