[erlang-questions] simple-one-for-one
Kaiduan Xie
kaiduanx@REDACTED
Sat May 23 19:57:51 CEST 2009
Dave,
What is the rationale to put the process under the simple-one-for-one
supervision? If the process does not need to be-restarted when it
terminates, there is no reason to supervise it. For the TCP connection
or call, if something goes wrong and causes the process to die, we can
just let it die without restarting the process.
Thanks,
kaiduan
On Sat, May 23, 2009 at 10:06 AM, Dave Smith <dizzyd@REDACTED> wrote:
> On Sat, May 23, 2009 at 7:41 AM, Kaiduan Xie <kaiduanx@REDACTED> wrote:
>> What is the typical usage for simple-one-for-one restart strategy? For
>> example, for a call processing server we need to spawn a process for
>> each call, do we need to put it under a simple-one-for-one supervision
>> tree? The same question applies to a TCP server which spawns a process
>> for each incoming TCP connection.
>
> Yup, that's how I generally use it. Any situation where you need many
> (usually anonymous) instances of the same type of process is a good
> fit for simple_one_to_one.
>
> D.
>
More information about the erlang-questions
mailing list