[Web-SIG] Re: Preferred set of WSGI servers
Ian Bicking
ianb at colorstudy.com
Fri Apr 29 18:53:30 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.
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.
I can imagine a good setup for hosts being one based on forking per-user
processes, which is adaptive primarily to scale down -- e.g., a largely
dorman app could have 1 or even 0 processes running (at 0 it becomes
similar to CGI, but presumably the process would stay around for some
time to respond to subsequent requests). The "scaling down" scenario I
often think about would be a email contact form -- one of those things
that has to be an app, can be implemented and deployed separately from
other aspects of the site, and yet it's clear waste of resources to keep
a process always around to respond to such requests. Though it's
actually someplace where CGI would work just fine; but lets say you
don't want to educate the developer about when they might want to use
other deployment strategies (which is a rather complex discussion
really, that would be better avoided by providing one really good
strategy and telling everyone to use it).
Maybe mod_python is appropriate for that kind of situation, I'm not
sure. It could also be implemented with a second, single process that
was developed and deployed separately from Apache.
As for IIS and ISAPI, I can't say I really know what the archicture of
that system is, so I don't know. Oh, but that does remind me of another
WSGI server: ASP. Though I remember vaguely this came up before and it
seemed infeasible because ASP didn't support anything like PATH_INFO.
Oh well, I can't remember now.
--
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Web-SIG
mailing list