bastion
bastion copied to clipboard
Children group elements launched before the group itself
trafficstars
Hey :wave:!
Currently, to allow ChildrenRef to both contain a list of a ChildRefs and be returned by Bastion::children and Supervisor::children_ref, the children's elements are launched before it (the Childs are launched by the creating method while the Children is launched by the Supervisor that received the Message::Deploy containing it).
We could either:
- Continue doing that.
- Remove the
elemsmethod fromChildrenRefor replace it to return the number of elements instead of a list of references. - Make
Bastion::childrenandSupervisor::children_reflaunch theChildrenthemselves and send an handle to theSupervisorinstead of the children group.
In option 2 I'd return a list of RefAddrs which is helpful with both identifying and talking to every Child this Children contains.
#139 will show decoupling Sender, Receiver and a Child could work.