Hi I would only add, that with Clojure 1.5 you can supply your own Executor using (send-via ), the default threadpools are not hard-wired anymore.
See https://github.com/clojure/clojure/commit/f5f4faf95051f794c9bfa0315e4457b600c84cef#src/jvm/clojure/lang/Agent.javafor further details. Las On Nov 17, 2012 3:24 PM, "Philip Potter" <philip.g.pot...@gmail.com> wrote: > > send-off works by submitting a Runnable to a newCachedThreadPool. > > http://stackoverflow.com/questions/11316737/managing-agent-thread-pools-in-clojure > > A Runnable sent to a thread pool will have exclusive use of that > thread until it completes; therefore, greater concurrency can only be > achieved by more threads, and 10k connections will need 10k threads. > > I don't know much about asynchronous IO implementations in Clojure, > but agents probably aren't what you want. > > Phil > > On 17 November 2012 13:06, Elliot <ell...@deck36.net> wrote: > > Hi all, > > > > I'm writing a c10k-style service, i.e. suppose 10,000 concurrent > > connections, mostly IO-bound. Clojure agents with `send-off` are > > fantastically close to what I want conceptually, but I'm curious about the > > implementation details--can anyone confirm, this would end up forking 10,000 > > threads, which would presumably kill the system under context-switching > > load? > > > > From what I understand, Erlang/Go have lightweight "actor" processes which > > are not true threads and are designed to have 10,000 of them spawned at once > > handling async-IO without problem. I'd prefer to stick with Clojure if > > possible but need to be able to handle the connection/IO-load. > > > > Anyone know how this works and/or has tried this in a production system? > > > > Any thoughts appreciated. Thanks! > > > > - Elliot > > > > -- > > 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 -- 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