[Web-SIG] Re: Preferred set of WSGI servers

mso at oz.net mso at oz.net
Fri Apr 29 19:47:16 CEST 2005


> Peter Hunt wrote:
>> Actually, I think a mod_wsgi for Apache and IIS would be one of _the_
>> most important things for WSGI. I think that it would search for a
>> __wsgi__.py file (or maybe something with a better name) which would
>> expose a WSGI application named "application" that would handle requests
>> for the directory in which it exists. This would allow a user to simply
>> drop a file on the webserver and have it work. It would be excellent for
>> shared hosting solutions.

Ian Bicking wrote:
> Would it?  From what I can tell, mod_php is very popular in shared
> hosts, but neither mod_python nor mod_perl are.  I don't think mod_*
> makes it necessarily host-friendly.  But from what I can tell of
> mod_python, it would be relatively easy to have something like .wsgi
> files, and give them a handler that runs them as WSGI apps.

More to the point, is mod_wsgi possible?  I thought it would be a great
replacement for mod_scgi and the framework-specific ones (mod_webkit), but
banged my head against the wall when it came to 'wsgi.input' because you
can't pickle an open file object or transmit it to another process.  So
mod_wsgi couldn't talk to an application server unless it were something
like SCGI in disguise.

I suppose it could work like mod_python with several parallel servers
running in Apache child processes.  But would be different enough from
mod_python to justify a new name?  More to the point, would it be
reliable?    I hear lots of problem reports about FastCGI and mod_python's
reliability, but I don't hear such reports for mod_scgi, mod_webkit, or
the various CGI adapters.  For myself, mod_webkit has been rock solid
except for one computer it wouldn't compile on, and likewise mod_scgi has
been reliable except for a bug with certain Reload requests (when the user
presses Reload), and I've never had a problem with a CGI adapter, but I
would hesitate to use the others or something based on them until they get
more reliability.

mod_php is popular because it was marketed early on as the *only* way to
run PHP, and is precompiled in many OS distributions.  I doubt it's
available on *most* public webhosts.  Most webhosts offer only ASP or CGI
if they offer any dynamic services at all.  Getting them to support *any*
Python mod_* option is an uphill battle in itself, so the existence of
mod_wsgi won't really make a difference.  Which doesn't mean it's not
worth building for our own webservers.

A reference implementation of mod_python + WSGI as described above would
be nice, so we can see how feasable/reliable/efficient it is compared to
the other adapters.  Maybe it could replace all of them in market share.

Or maybe we just need PHPython. :)

-- Mike Orr <mso at oz.net>



More information about the Web-SIG mailing list