Re: mod_wsgi for cherokee?
Alvaro Lopez Ortega <alvaro <at> octality.com>
2008-12-01 19:09:10 GMT
On 01-dic-08, at 19:25, Christopher Grebs wrote:
> I have read the discussion about the issue of a missing WSGI wrapper
> for Cherokee.
Please don't call it a "missing wrapper". I'd rather suggest something
like "right technical decision".
> I'm planning to push my whole infrastructure over to a Cherokee
> based setup. But since there are many wsgi applications running I
> would be pleased to let them run in the same way I did with my
> apache setup. But with all advantages Cherokee provides (Load
> Balancing, easy Administration etc.). I know that WSGI-Based
> applications can run without any code patching on CGI/SCGI/FastCGI
> and so on... But the way WSGI handles just everything is ingenious.
Well, WSGI is certainly a really interesting thing. It allows
developer to write web applications without having to worry about the
protocol it uses underneath to communicate with the web server. That's
a very good thing, actually.
So, allow me to clarify things a little bit: The only purpose of WSGI
is to provide an API with which developers could write protocol
independent (as in SCGI, FastCGI, AJP 1.3, etc) applications.
And here is where Apache's mod_wsgi comes into scene: it basic idea is
to sunk a Python interpreter within the server, so the application
calls go through a intermediate conversion layer to get converted to
something the web server can deal with.
IMHO mod_wsgi is simply a module that implements many wrong technical
decisions altogether. I wouldn't like to kick off this discussion
again, but basically, linking a whole interpreter within a web server
is a clumsy approach: it's insecure and slow, aside of its flawed
architectural design.
I do think that your current approach is the way to go: The
application server (your WSGI application) runs in a different process
that communicates with the server through a local (unix?) socket.
That is in fact a faster and much more secure and reliable way of
working. _Give it a try, and you will see what I mean_.
> Is there any progress on a WSGI module yet?
Progress? No. It isn't simply on the roadmap.
You can currently run WSGI applications by launching them as
application servers (with either SCGI, FastCGI or HTTP access). Let's
forget about all the hacks Apache had to come up with in order to ease
its performance issues!
So, summing up: WSGI is a really good thing. However, the mod_wsgi's
approach is simply wrong.. and I'm willing to reproduce any of those
Apache's bulky modules in Cherokee.
--
Octality
http://www.octality.com/