Is concurrency hard?

Ulf Wiger ulf@REDACTED
Tue Nov 1 16:43:08 CET 2005


Den 2005-11-01 09:01:52 skrev Micky Latowicki <biosap@REDACTED>:

> Hi all. I'd like to tap on your wisdom and experience regarding a general
> question.
>
> Is concurrency inherently hard?

Well, yes and no. There are concurrency problems that
are inherently hard -- sometimes even inherently unsolvable.
OTOH, this is certainly true for most fields of programming.

Most concurrency problems needen't be difficult, if approached
the right way. Often, thinking about a real-world analogy (e.g.
"how would the problem be solved using a group of people, snail
mail and phone calls?") will get you quite far. Using this approach,
you can take advantage of millennia of human experience. (:


> I've seen it stated elsewhere that writing concurrent software
> cannot be made easy. The author was writing in a context of a
> very different approach to concurrent programming than erlang's
> and I was curious if erlang developers feel the same way. If so,
> then what's hard about it when working with erlang?

Concurrency based on POSIX threads is ridiculously difficult. Concurrency
in Java is difficult. In general, concurrency based on shared memory
is asking for trouble. But this is what most people attempt to do.

I think concurrency in Erlang is a natural and intuitive modelling
technique, and part of the fun. I don't think of it as difficult
in general, even though I recognize that some specific problems are.

/Uffe
-- 
Ulf Wiger



More information about the erlang-questions mailing list