I've written a short blog post on using Clojure to search for
available ssh servers on my companies VPN. It starts with a single-
threaded example and then adds concurrency. The performance difference
in this case was pretty extreme. Sweeping 254 hosts in a serial single-
threaded fashion took twelve minutes with a network timeout of five
seconds per host. Adding concurrency resulted in a full sweep in six
seconds. If nothing else, I guess this is a good illustration of what
a huge win concurrency can performance wise.

I initially tried to use pmap to parallelize the connections, but it
didn't provide any improvement (maybe I did it wrong?). I opted to use
agents with send-off because the documentation specifically mentions
that send-off is intended for situations where the applied function
might block. Anyway, I welcome suggestions as I'm still learning. The
article can be found here:

http://travis-whitton.blogspot.com/2009/07/network-sweeping-with-clojure.html

Thanks,
Travis
--~--~---------~--~----~------------~-------~--~----~
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