On Mon, Sep 13, 2010 at 10:24 PM, FGM at GMail <fgmar...@gmail.com> wrote:

> Hello,
>
> Having to do some work in Python recently, I had to dig into WSGI and found
> that its model, much similar to what JSGI, PSGI, Rack do, seemed likely to
> bring a potentially high performance improvement on my usual (Drupal)
> environment. This also happened to match a remark done by Rasmus during his
> presentation in late August at Drupalcon CPH, in which he advised us to
> evolve Drupal towards a model with a long-term application process - PHP or
> not, apparently not in his idea (C ?) - to avoid the massive amount of time
> and effort currently spent on our per-page bootstrapping process, and
> return
> PHP userland code to the more "templating" parts of the CMS.
>
> However, after digging around on the list archives and elswhere, I could
> find no trace of a discussion about an approach like this one. CGI/FCGI
> sure, FPM sure, but nothing like WSGI. The closest approximation appears to
> be the WPHP package, which does indeed embrace PHP within actual WSGI, but
> does so at the cost of a fork/exec per hit, definitely the opposite of the
> goal being looked for.
>
> Has there ever been such a discussion, if only to dismiss the prospect as
> incompatible with PHP/ZE ? Any pointers to more information would be
> appreciated.
>

Have you seen this?
http://github.com/indeyets/appserver-in-php

I also had a crack at implementing a web server in PHP. It's inspired by
Ruby's Rack and even uses the mongrel HTTP parser:
http://github.com/dhotson/kelpie
.. mine is mostly just a toy and hasn't been thoroughly tested, but I did
manage to halve my app's average response time without even really trying.

The main advantage of the app server approach is that you can do your
framework init stuff once at server startup instead of every single request,
which can be a pretty huge saving.
The main problem is that PHP isn't very good at long running processes.

Also worth checking out: http://mongrel2.org

- Dennis Hotson

Reply via email to