threaded http server

Steve Holden steve at holdenweb.com
Wed Feb 20 08:08:59 EST 2008


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/064088.html
> 
> 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.holdenweb.com/




More information about the Python-list mailing list