[erlang-questions] custom supervisor
Serge Aleynikov
saleyn@REDACTED
Thu Sep 25 16:04:24 CEST 2008
I've also always been using this "middle-man" approach, where the parent
supervisor has a restart strategy with {MaxRestarts, MaxTime} = {0, 1},
and the childspec spawns a linked process that actually acts as a
"supervisor" for its linked child(ren). This is very similar to what
supervisor_bridge behavior is.
You can see an example of such a supervisor that allows scheduled
execution of tasks here:
http://forum.trapexit.org/viewtopic.php?p=44147#44147
Serge
Dave Smith wrote:
> On Thu, Sep 18, 2008 at 12:26 PM, Anthony Shipman <als@REDACTED> wrote:
>> Is it possible to write a custom supervisor and include it an OTP environment?
>> Looking at release_handler_1 in the sasl application is seems to assume that
>> the implementation module for a supervisor is always stdlib:supervisor.
>
> This is a question I'd love to see answered by the OTP team. There
> have been several situations where I wanted to create a custom
> supervisor, but in the end just went with a normal sup w/ another
> process working as an interface (of sorts) to the supervisor to
> accomplish my goals.
>
> My understanding (perhaps flawed) is that you rarely want to introduce
> new code into the supervisory tree since if you screw it up, it will
> dramatically affect the overall stability of your application. But the
> desire to customize the supervisor behaviour a bit more does pop up
> often enough that I wonder if there is a better way to attack this
> need for extensibility.
>
> D.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list