"well I think the main advantage" is memory. :-) Theoretically (I think), thread-per-connection servers can be very close to matching asynchronous servers in throughput, but they definitely require much more RAM to do so. RAM is one of the more expensive commodities to come by on VPS and cloud servers.
Of course, I'm being facetious, I think we can agree that there are lots of advantages to evented servers, and it's awesome they're getting better support in Clojure! - Greg On Jul 7, 2010, at 10:04 PM, David Nolen wrote: > 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 -- 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