[Twisted-Python] network server on multiprocessor hardware

Glyph Lefkowitz glyph at twistedmatrix.com
Fri Sep 4 19:20:57 EDT 2009

On Fri, Sep 4, 2009 at 4:59 PM, Bokhan Artem <art at academ.org> wrote:

> Hello.
> Is there right (standard) way to write twisted network server
> (tcp/web/mail/etc) which could use several cpu cores? For example,
> master+workers model, where every worker doing the same job.
> If so, may somebody help to wrap the sample code below?
> May be some well-known twisted based software can do that?

The sample code you've provided doesn't do anything; no CPU consumption of
its own (it's all in the framework) and no network I/O of its own.  So it's
hard to come up with a realistic example.  There's no way to tell Twisted
itself to spread itself out over multiple CPU cores, but then, Twisted
itself is rarely the chief CPU consumer in an application.

If you want to take advantage of multiple CPU cures though, have a look at
Ampoule: <https://launchpad.net/ampoule>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20090904/c9a1407d/attachment.htm 

More information about the Twisted-Python mailing list