Asynchronous HTTP server in standard library ?

P

Pierre Quentel

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
 
W

Wilk

Pierre Quentel said:
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 ?

I think you'll be welcome in the web-sig !!!
http://python.org/sigs/web-sig/
 
J

John J. Lee

Wilk said:
I think you'll be welcome in the web-sig !!!
http://python.org/sigs/web-sig/

Yes, certainly -- don't let it worry you that the discussion died down
for the last month or so. It'll likely start up again if/when
somebody posts something interesting (or, more accurately, when
somebody posts something controversial ;-).


John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top