Proper parallelism?

2011-11-22 Thread AndyK
I have been using Clojure to write tests on RESTful applications. Since the requests are independent, parallelizing would speed things along. What is the best approach? Using pmap is the obvious first step. Afaik, pmap only creates a small pool of threads. Is there more to gain by going to the

Re: Proper parallelism?

2011-11-22 Thread Linus Ericsson
There's an approach using agents described here: http://travis-whitton.blogspot.com/2009/07/network-sweeping-with-clojure.html It's a bit old, so somethings in the example could be a bit outdated, but the idea may help you forward, /Linus 2011/11/22 AndyK andy.kri...@gmail.com I have been

Re: Proper parallelism?

2011-11-22 Thread vitalyper
Andy, You can also look into using futures (pmap uses future). In section 11.6.1 of Joy of Clojure there is a recipe how to dispatch multiple RPC calls in parallel using as-futures macro. Obviously, this depends on what you want to do with results of your REST calls. On Nov 22, 11:16 am, AndyK

Re: Proper parallelism?

2011-11-22 Thread Gary Trakhman
Clojure futures use the send-off thread-pool (unbounded), which is defined like this: from Agent.java: final public static ExecutorService soloExecutor = Executors.newCachedThreadPool(createThreadFactory(clojure-agent-send-off-pool-%d, sendOffThreadPoolCounter)); So, it's using executors.