[Web-SIG] Asynchronous HTTP server in standard library ?
quentel.pierre at wanadoo.fr
Sun Jan 11 16:05:17 EST 2004
I am new to this web-sig mailing list, I was lead to it by Wilk after posting the suggestion below on comp.lang.python. If you have heard of Karrigell, one of the web frameworks in Python, I'm the one to blame for it...
Well, here is my suggestion :
Python standard library provides two modules for asynchronous socket
programming : asyncore and asynchat. Several web servers have been built
upon these modules (medusa being the best-known I suppose) and are famous
for their performance level
Unfortunately no example of use is provided in the standard library (whereas
the more "classic" SocketServer is illustrated by BaseHTTPServer,
SimpleHTTPServer, etc). I think it would be useful if Python came with a
simple HTTP server written with these modules, to help beginners understand
how use them
I've written one, which handles GET and POST requests. It's inspired by (and
partly copied from) the http subset of medusa, only reduced to less than 200
lines. It's called SimpleAsyncHTTPServer and published on Active State
Any thoughts ?
I've quickly read the archive of this mailing list, my proposal matches one of the items on Bill Janssen's page :
"A standard server framework on the order of Medusa.
This should support a standalone Python web server, with the ability to serve files, and the ability to add new handlers. Not sure it has to support CGI invocation. -- Bill Janssen "
Perhaps this SimpleAsyncHTTPServer is a step in this direction ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Web-SIG