I've merged all the feedbacks and things we noticed during the Plack implementations back to the main PSGI spec draft and updated it. It has lots of answers to the common questions and gotchas when writing a new server implementation. It also has a big list of contributors!
I updated Plack::Impl::Coro to now use the excellent Net::Server::Coro module, and it's now less code, passes all the tests and runs brilliantly fast like 2500 req/s for the simple Hello World app. I also enabled Coro::AIO (that uses IO::AIO inside) to sendfile(2) based file serving, which is as fast as AnyEvent based asynchronous server.
This new Coro backend is quite a big deal since now your app can block as long as the block automatically yield to the other threads (coroutines) using Coro:: magic. For instance, slowapp.psgi which does "sleep 0.1" can run like 100/s (instead of 10/s) on a single thread Coro server because sleep() can now be cooperative and non-blocking using Coro::Timer.
We found some issues with a big file (2MB) serving with AnyEvent backend on Linux when IO::AIO is not available. Seems like it's a problem with our code usage with AnyEvent->io and AnyEvent::Handle, which doesn't really work efficiently against local files on Linux (epoll). It's still reasonably fast on other platforms or Linux with sendfile support, though.
Kazuho has been improving the performance of Prefork server, while Daisuke Murase is working on Danga::Socket based asynchronous server so that we can all PSGI app from Perlbal etc.
Good progress!
For some reason, Net::Server::Coro had escaped the transition from SVN to Git, but I've remedied that now -- it now lives at http://github.com/bestpractical/net-server-coro/ Let me know if you run into any problems with it!
Posted by: Alex Vandiver | 2009.09.16 at 13:43