[erlang-questions] Supervisor tree width?

Angel Alvarez (GMAIL) angeljalvarezmiguel@REDACTED
Mon Jun 9 13:05:36 CEST 2014


Thanks all for your responses.

@Ingela, good point, hopefully I will be starting all the children dynamically at different times..

I have a bunch of packet decoders asking the supervisor to spawn a new child if needed (and they remembers the pid to some extend). Also I have a gen_server caching all the children {id, Pid} to avoid having to ask the supervisor the whole children list on every request.

I hope this will prevent me from hitting a hot spot on the supervisor for now.


Regards,

Angel Alvarez
angeljalvarezmiguel at gmail.com



El 08/06/2014, a las 11:38, Ingela Andin <ingela.andin@REDACTED> escribió:

> 
> Hi!
> 
> 2014-06-06 22:31 GMT+02:00 Angel Alvarez (GMAIL) <angeljalvarezmiguel@REDACTED>:
> Sorry I came across this, and I need to ask,
> 
> 
> I'm planning to have several thousand children (FSM machines  under the same supervisor.
> 
> There is one FSM per client and they don't talk to each other so they are unrelated in this regard ..
> 
> I thought "simple_one_one" is designed to cope with this, is it the right thing to do? or I'm missing something out?
> 
> 
> 
> I think you are on the right track. However supervisors can need some further development in some places, and  it can be
> desirable to start the processes without "init_ack-synchronisation" and then use gen_server/fsm:enter_loop. (The ssl application does this).
>   
> Regards Ingela Erlang/OTP team - Ericsson AB  
> 
>  
> Thanks in advance!
> 
> Angel Alvarez (GMAIL)
> angeljalvarezmiguel@REDACTED
> 
> 
> 
> El 30/05/2014, a las 15:02, Dmitry Kolesnikov <dmkolesnikov@REDACTED> escribió:
> 
> > I’ll be trivial to say that design of supervisor tree is an application specific.
> >
> > One lesson learned is that supervision it’s about the guarantees. Take a look into Fred’s post
> > http://ferd.ca/it-s-about-the-guarantees.html
> >
> > Personally, I’am splitting an application to smaller functional units with own supervisors per unit.
> > If an unit design needs 15 children then I see no issue to have them.
> > However, if 15 children do not have any relations each other then I am combining them to guaranty deterministic application state after failure.
> >
> > Best Regards,
> > Dmitry
> >
> > On 30 May 2014, at 14:28, Roger Lipscombe <roger@REDACTED> wrote:
> >
> >> I'm concerned that the top-level supervisor in one of our applications
> >> has too many children. It has about 15 children, which are only
> >> vaguely related to each other.
> >>
> >> What's a good rule-of-thumb for whether a supervisor tree is too wide?
> >> Or too deep? Or am I thinking on the wrong level here?
> >>
> >> Thanks,
> >> Roger.
> >> _______________________________________________
> >> erlang-questions mailing list
> >> erlang-questions@REDACTED
> >> http://erlang.org/mailman/listinfo/erlang-questions
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-questions
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140609/487983ae/attachment.htm>


More information about the erlang-questions mailing list