Supervisors do a synchronous start of their children, starting each one in turn before starting the next in the order they occur in the childspeclist. So your super_supervisor
should start its children in the right order, first config_supervisor
, then auth_supervisor
and finally rest_supervisor
by having them in that order. A supervisor must (successfully) start all its children before it is considered to be started. So if config_supervisor
has all the necessary processes which must be started during the initialization as its children then super_supervisor
will not start the other supervisors until the config_supervisor
is done.
In this case you would not need rest_for_one
to ensure starting in the right order if the children are in the right order in the childspeclist.
For a worker process, gen_server/gen_fsm/gen_event, they are considered started when their init
callback returns.
Have I understood your description and question correctly?