Threaded server in python!?

Mike Meyer mwm at mired.org
Sat Jan 4 12:26:56 EST 2003


Andrew Bennetts <andrew-pythonlist at puzzling.org> writes:
> On Fri, Jan 03, 2003 at 10:10:53PM +0100, Achim Domma wrote:
> > Hi,
> > 
> > I would like to implement my own http chat server. As far as I know pythons
> > threads are not very efficient due to the global interpreter lock. But
> > applications like Zope, Webware, ... work fine and they use threads. Am I
> > missing something or could somebody post some experiences (good ones and bad
> > ones) with threaded, socked based python servers.
> 
> Why do you think you need threads to do this?
> 
> Using a library like Twisted <http://twistedmatrix.com/>, it's
> straightforward to handle multiple sockets, without needing threads.
> 
> As a bonus, Twisted has implementations of many common protocols, ready for
> you to use and adapt to your problem

The above also applies to medusa, except that it's a multi-protocol
internet server instead of a library. I actually wrote an http chat
server on top of medusa for a client, and was pleased with how well it
worked.

        <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.




More information about the Python-list mailing list