[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: threaded http server

Steve Holden

2/20/2008 1:09:00 PM

bharath venkatesh wrote:
> hi
> i want to create fast n efficient http server which serve multiple
> client concurrently .. so i thought of threading the http server using
>
> class HTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer):
> pass:
>
> as this creates an threaded version of http server ... but i read in
> one of the postings in mailing list that it will create a deadlock .
> the following postings can found at
> http://mail.python.org/pipermail/python-list/2001-January/0...
>
> as mentioned in that posting log_request must be redefined... can any
> one tell me how to redefine it so that it creates a threading
> behavior for fast n efficient http server. or will it be ok just to
> pass the definition as done in the posting mentioned above and still
> create an efficient threading behavior
>
For fast and efficient, move away from any pofh te SocketServer based
libraries immediately. Regard them more as proofs of concept, and simple
models you can tinker with to improve your understanding.

Twisted, TurboGears, Django, Zope - these and other frameworks have
reasonably efficient ways to serve the web from Python.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.hold...