[Web-SIG] Asynchronous HTTP server in standard library ?

Pierre Quentel quentel.pierre at wanadoo.fr
Sun Jan 11 16:05:17 EST 2004


Hello everybody,

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
Python Cookbook
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/259148

Any thoughts ?
Pierre

---------------

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 ?

Regards,
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/web-sig/attachments/20040111/d4f7cb78/attachment.html


More information about the Web-SIG mailing list