[erlang-questions] How to Name Concurrency Patterns

Joe Armstrong erlang@REDACTED
Wed Feb 19 23:08:58 CET 2014


On Wed, Feb 19, 2014 at 10:41 PM, Loïc Hoguin <essen@REDACTED> wrote:

> 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
>

The idea is simple - but it could take *hours* to discuss possible
implementations.
Umm  - are message eventually delivered in order? what happens during a
failure etc. Do we make
a log tree of publishers ... etc.

my 5-10 minutes was for idea + simple code


>
> 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.
>

Now that's trolling - what about Maxwell's equations? All of
electrodynamics in
four  equations

This is fun:

https://en.wikipedia.org/wiki/Deferent_and_epicycle

Ptolemy and his mates thought the planets moved in epicyles, they make
wonderful drawings
of this, and gave examples - trouble was they were all wrong. Good old
Kepler put them
right with a few equations.



> 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.
>

Yes - but names like gen_server supervisor, gen_fsm are useful to express
designs (to people who know
OTP) but we need more well know names


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


> --
> Loïc Hoguin
> http://ninenines.eu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140219/a63c860f/attachment.htm>


More information about the erlang-questions mailing list