[Twisted-Python] Can I benefit from multi-processor hardware?

Andrew Bennetts andrew-twisted at puzzling.org
Mon May 24 01:14:59 EDT 2004


On Mon, May 24, 2004 at 12:56:38AM -0400, Phillip J. Eby wrote:
[...]
> 
> So, to take advantage of multi-processor hardware, you can do your 
> calculation-intensive work in separate processes, with the network 
> communications being handled by an event-driven front end.  Note that this 
> is basically true for *any* Python program, not just Twisted.

Or, potentially, inside free-threaded C or C++ extensions... it depends on
the situation.

I wrote a Twisted server on Windows that replaced a C++ one quite
comfortably, partly due to much of the work being talking to an SQL
database, which you can do in threads easily (see the twisted.enterprise
package), while handling the networking with Twisted.

-Andrew.





More information about the Twisted-Python mailing list