Re:Clojure's edge on Node.js
by gizmomagico on Friday July 09, 2010 @03:51PM
(#1501984)
If you're doing thread-per-request, than no.
Pro-tip: This time, you were looking for the word "then". But "than" really exists too, and is even used sometimes (when comparing things)!
Yeah, downvote away.
I don't usually make that mistake; I might be losing a little off the top end of my English ability, since I'm living in Japan right now.
But you're correct. :)
And I also don't downvote anything except outright spam; everybody has the right to an opinion, whether or not I agree with it.
I set up a Rack adapter through Jetty 7 on JRuby that works exactly like this. The SelectChannelConnector is event-driven I/O, and the QueuedThreadPool handles requests in parallel.
The result? 6k req/sec on my laptop for a simple Rack app, basically the same as what's shown in these examples, since my machine is quite a bit slower, and I've clocked 10k/sec on faster machines.
(By the way, if you're interested, the Rack handler is in a gem called 'mizuno', and is at http://github.com/matadon/mizuno)