Although I understand each of the concurrency "primitives"/systems
(stm, agents, atoms, dynvars) in isolation I find it harder to choose
wisely between them when designing/implementing specific algorithms
and programs.

Do you have any advice/tips for how to choose between Clojure's
different concurrency constructs?
How do you decide which construct to use for a particular algorithm/
program?

To me it often feels as if there is no clear-cut, best solution.
Rather several possibilities would all work ok and I'm not sure how to
trade-off performance with maintainability/understandability.

As an example I recently implemented an Evolutionary Computation
framework where a population of individuals are evaluated and then
operated on with different genetic operators. This is an
"embarassingly parallel" algorithm where most anything can go on in
parallel. But do we need to keep the individuals in a ref so we can
control the size of the population (maybe handy but not really needed
for EC performance), should operators be agents so that we can have as
many of them as there are cores etc. etc.

Any advice/links/pointers on designing with a more complex set of
concurrency primitives appreciated. I don't feel previous material/
books I've read (written in a mainly-pre-concurrency era (at least
compared to Clojure)) gives enough since concurrency were not really
an essential elements of the languages then in vogue.

Something like "Design Patterns" for Clojure concurrency would be
nice... ;)
(Googling I found this: http://www.cs.wustl.edu/~schmidt/POSA/POSA4/
Someone read it? Relevant?)
--~--~---------~--~----~------------~-------~--~----~
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
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