On Wed, Jul 7, 2010 at 2:10 PM, James Reeves <jree...@weavejester.com>wrote:

> The main advantage of a non-blocking server is that you're don't use
> up a thread waiting for an event (such as the user sending data, or
> some other external trigger).
>
> - James


I think the main advantage of a non-blocking server is throughput, or at
least that's what I'm seeing. I haven't been able to get Jetty to serve
faster than 100 rq/s, while aleph (via Netty) is easily getting 600-700 rq/s
even if I'm writing to a database (CouchDB).

I don't really care if threads do or don't get eaten up. In fact, in the
"Hello world" microbenchmark Node.js gets trounced by aleph because aleph
can take advantage of all cores.

I also note that using future gives me more throughput if I'm using
(Thread/sleep 1).

In summary the raw request throughput of Netty NIO + the sanity of Clojure's
concurrency primitives (atom, agent, ref, future, promise) might just be a
real sweet spot.

David

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to