What are processes good for?

Jay Nelson <>
Sun Mar 23 19:59:56 CET 2003


In a previous post 
(http://www.erlang.org/ml-archive/erlang-questions/200303/msg00282.html)
I listed some ideas:

 > 1) Modeling real world concurrent activities.
 > 2) Strong encapsulation
 > 3) Code reuse / abstraction / adapting interfaces.
 > 4) Simulating environmental influences.
 > 5) Creating unpredictable, complex behaviour / adaptive behaviour
 > 6) Resource management / distribution

I have a new one to add:

7) Partitioning for fault isolation purposes / instrumenting
data flow

Inter-process communication is a fundamental concept in
erlang.  The language provides bifs for sending / receiving
messages and for trapping a process that fails unexpectedly.
One source of unexpected failure is unexpected input.
Isolating a failing function in a separate process means that
the datastream in and out of the function can be monitored
in realtime without interference with the rest of the system
(potentially even on a different node) or modification to the
failing function itself.  Likewise, whenever a dataflow measurement
is desired, a process boundary can be introduced with the
data being fed to both the instrumenting process and the
follow on process.  This can be implemented in a way analogous
to error_logger so that multiple processes can contribute
data that are compiled and organized using a single mechanism.

jay






More information about the erlang-questions mailing list