one-for-one supervisor with concurrent start/shutdown

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

one-for-one supervisor with concurrent start/shutdown

Maxim Fedorov-2
G'Day,

OTP implements sequential start/shutdown procedure for rest_for_one
and all_for_one supervisors, assuming there are dependencies between
children. It requires startup/termination order.

simple_one_for_one implements concurrent shutdown. Startup is
sequential due to the dynamic nature of this strategy.

one_for_one supervisor implements sequential startup and shutdown. Is
there any way to do it concurrently? Children are supposed to be
independent of each other.

Concurrent shutdown is easy to add, it's already done for
simple_one_for_one. But startup is implemented as MFA callback, with
no message protocol.

proc_lib has message protocol internally, but not all children may follow it.

Would it make sense to have yet another restart strategy (I'd name it
async_one_for_one) ?
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions