[erlang-questions] A visual tour of Erlang

Ulf Wiger <>
Sun Jun 3 11:11:55 CEST 2012


On 3 Jun 2012, at 06:41, Anoop Thomas Mathew wrote:

> It aroused a question in me that, isn't erlang creating way too many processes, and why is that so?

There is such a thing as too many processes - and too few.

The key thing about a process is that it is a single thread of control.

If you try to handle multiple, interdependent and interleaving tasks
in one single thread of control, bad things tend to happen, just as
it tends to do when one human being tries to handle too many things
at the same time.

But many threads of control need managing/coordination. Just as
human organizations become unwieldy when there are more people
than the problem calls for, too many processes in a concurrency-
oriented program tends to become a problem in itself.

The trick, then, is to figure out how many processes the problem calls
for, and to use that many - no more, no less.

Drawing inspiration from how people solve coordination problems,
including how people deal with uncertainty and inconsistencies,
can be a great help when programming Erlang.

BR,
Ulf W

Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
http://feuerlabs.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120603/83a5b225/attachment.html>


More information about the erlang-questions mailing list