Re:Aleph: A new event-driven web server for Clojure
by ant5 on Thursday July 08, 2010 @07:56PM
(#1499197)
The 3.0 servlet spec fortunately includes support for async processing, so you can give your thread back mid-handling the request; No more thread-per-request required.
Jetty has also supported their own async handling extension for quite some time now (but they're moving to the 3.0 standard). I've used it to build 'Comet' servers before, and it does the trick.
Re:Aleph: A new event-driven web server for Clojure
by hannesw on Friday July 09, 2010 @04:57AM
(#1500171)
We use Jetty's ability to do both sync and async HTTP in RingoJS. I've written about it here: http://hns.github.com/2010/07/02/versatility.html
I think Netty is great if you want fine grained control over each aspect of your network stack and/or ultimate performance. But having a full featured web server that does sync and async equally well is a value that shouldn't be dismissed either.
Of course, the correct answer is (IIRC) that standard Java web servers don't support the NIO asynchronous request paradigm - the standard Java servlet spec is thread-per-request.
But not everyone knows that.