[erlang-questions] How to Name Concurrency Patterns

Loïc Hoguin essen@REDACTED
Wed Feb 19 22:41:24 CET 2014


On 02/19/2014 10:14 PM, Joe Armstrong wrote:
>
>
> Hello, I'm giving a course in distributed and parallel programming in
> Erlang ...
>
> Next week I'll be talking about common concurrency patterns, I was
> talking with the course adviser, and I rattled off the names of a few
> concurrency patterns that were well-known and easy to explain. I said
> I'll do PUB-SUB, pipeline, map-reduce, parallel map, and so on.
>
> At this stage the course adviser said that a) things like PUB-SUB
> would not be familiar to the students and that b) It would take more
> than 5-10 minutes to explain PUB_SUB.

Your course adviser lacks imagination. It takes a few seconds to explain 
PUB-SUB. These things are PUB-SUB:

  *  Twitter
  *  Facebook
  *  Mailing lists
  *  IRC channel / group chat
  *  Newsletter

Most of these patterns can be explained with a fairly simple drawing.

pipeline: data -> intermediary -> result

map-reduce (I simplified, I'm no good at this ASCII stuff):

data -> intermediary -\
data -> intermediary ---> result
data -> intermediary -/

And so on.

A good drawing and a few known examples are worth a million words.

I would be interested to hear what name people suggest, but I'm afraid 
there's about as many concurrency patterns as there are possible 
combinations.

I suggest calling the DNS pattern Howard and the load 
balancer-replacement pattern Clementine.

-- 
Loïc Hoguin
http://ninenines.eu



More information about the erlang-questions mailing list