reinventing the web server

Van Gale news at exultants.org
Wed Jun 18 05:49:09 EDT 2003


Simon Wittber (Maptek) wrote:
> Hello Python People.
> 
> Is it worthwhile reinventing my own Python web server, the way I want
> it? Or is it a waste of time... and should I be sticking to existing
> technologies?

There are other alternatives you can check.

The old and venerable Medusa includes a pretty minimal web server that's 
used in many production systems (including some that aren't Zope based). 
  See http://www.amk.ca/python/code/medusa.html

I guess if you think Twisted is heavyweight you won't like Zope :/  In 
all seriousness though, twisted

As for web server interfaces, mod_python can be a bit heavy, but it is 
pretty well supported with an active mailing list and works on both 
Apache 1 and 2.  Also, you don't have to use the higher level (heavy) 
stuff.  You can just use it as a (faster) cgi interface.  It's not great 
for developing an app though... having to restart Apache after each edit 
just isn't right :)

There are other server interfaces:

PyWX interfaces with AOLServer.

There's also mod_snake for Apache 1.  It's no longer maintained so there 
won't be a version for Apache 2 unless someone else takes over.  It took 
a "minimalist" design approach (i.e. no publishers or higher level 
session stuff... just request headers).  The current version seems 
pretty stable.

Also check out mod_scgi for Apache 1 
(http://www.mems-exchange.org/software/scgi/)

Finally, it's possible of course to use mod_fastcgi.

My recommendation however, is to look at the higher level web frameworks 
  instead and decide if one fits your needs.  Many of them work with 
several of the web interfaces, and include pretty easy instructions for 
configuring using each interface.

For instance, Quixote <http://www.mems-exchange.org/software/quixote/> 
works with cgi, mod_fastcgi, mod_scgi, mod_python, and medusa. Someone 
even played around and made a Twisted interface.

Albatross <http://www.object-craft.com.au/projects/albatross/> works 
with at least cgi and mod_python.

pso <http://www.scriptfoundry.com/modules/pso/> works with mod_python, 
mod_snake, mod_fastcgi, and cgi.

There are many more of course.  A better list can be found in the Python 
Wiki <http://www.python.org/cgi-bin/moinmoin/WebProgramming>

Also check out the Web Framework Shootout 
<http://colorstudy.com/docs/shootout.html>

Van





More information about the Python-list mailing list