Daisuke Murase made Plack::Impl::Danga::Socket, the standalone web server that runs PSGI application. I made Perlbal::Plugin::PSGI that is a Perlbal plugin so you can combine with other Perlbal plugins.
They both work in a single threaded Danga::Socket or Perlbal server process so your application is not supposed to do any blocking operations, but both support psgi.async callback so your applications can immediately return and then do the server side push or event based callback with event loop like AnyEvent. My Perlbal plugin code is solely based on Mart's Perlbal::Plugin::Cgilike which does, CGI-like (or rather mod_perl-like) handler dispatch. Today we've got more sophisticated (but still low level :) PSGI, so it's time to give it another try!
Simple benchmark shows Danga::Socket standalone gives 2000 req/s and Perlbal plugin gives 1200 req/s, both of which are pretty fast. Perlbal plugin version doesn't do sendfile(2) AIO stuff on my Mac OS X laptop since Sys::Syscall doesn't seem to support it. I also did benchmarking using Mart's experimental Danga::Socket::AnyEvent so the app can use AnyEvent modules to do event callback and the number seems roughly the same, which is a great sign!
sukria's been updating his Dancer micro framework to fully support PSGI from the ground up, and has found some issues with Apache2 SCRIPT_NAME and PATH_INFO. Apache2's SCRIPT_NAME is set randomly if the app is hosted on / (root) at all, but I added some workaround to set more correct (per PSGI spec) PATH_INFO to the root access.
We observed issues with IO polling on Linux when IO::AIO is not available last night, and I made some fixes so as it won't use AnyEvent->io or ::Handle but instead use on_drain callback to read from local file as much as possible whenever the write buffer gets empty. Seems to have fixed the issue on linux environment.
Overall, we seem to put too much efforts writing "real" web servers :) It's been really fun but we should stop at some point, since realistically most people would want to run their perl web applications on mod_perl, FastCGI or our pretty fast preforked Standalone server and use frontend servers like nginx, lighttpd or perlbal to do reverse proxy on them. That's something we'll eventually recommend on our Plack stack anyway, but having pretty fast pure-perl web servers might not hurt, right?
Recent Comments