[erlang-questions] Generic server and state recovery
Jesper Louis Andersen
Thu Dec 9 19:20:06 CET 2010
On Thu, Dec 9, 2010 at 7:15 PM, Alessandro Sivieri
> Yes, but I already have a supervisor supervising that process, isn't a
> monitor process a kind of repetition of the same (or similar) task?
I don't think so.
The supervisor has the responsibility of restarting fallen processes.
The monitoring process (in etorrent at least) is often the governor of
an ETS table. It maintains serialization on the table when needed and
it cleans up the table through receiving a 'DOWN' message. I.e., the
monitoring process is responsible for keeping and maintaining certain
kind of state on behalf of the working process. You don't want to
muddle these two responsibilities into one, I think.
More information about the erlang-questions