Event driven server that wastes CPU when threaded doesn't
lycka at carmen.se
Thu Nov 2 13:04:27 CET 2006
> I'm attempting to create a lobby & game server for a multiplayer game,
> and have hit a problem early on with the server design. I am stuck
> between using a threaded server, and using an event driven server. I've
> been told time and time again that I should use an event driven server
> design (that is, use twisted).
> Is the only solution to use a threaded server to let my clients make
> their requests and receive a response in the fastest possible time?
You got a lot of long-winded replies, but the short reply is that
Twisted has packaged solutions for this. See
"Twisted provides an interface to any Python DB-API 2.0 compliant
database through an asynchronous interface which allows database
connections to be used, and multiplexed by multiple threads, while still
remaining thread-safe for use with Twisted's event-based main loop.
Twisted Enterprise provides these services by leveraging Twisted
Internet's utilities for managing thread pools and asynchronous
More information about the Python-list