I have a pool of resources, say 10k children(FSMs) each holding a resource.<div><br></div><div>If I want to remove a resource from the pool, of which they may be duplicates, I have two options.</div><div><br></div><div>1) Walk the list of children and tell each one "hey, if this is you, close up shop."</div>
<div>2) Maintain a dict/ETS of all resources, which has more run-time overhead and a higher likelyhood </div><div> of "something happening."</div><div><br></div><div>If the supervisor dies, all resources are shut down as they're children, so having the supervisor maintain</div>
<div>the dict/ETS is an option.</div><div><br></div><div>Having another FSM outside the call-tree maintaining that status is an option but, in the case of that</div><div>FSM going down then all resources are "lost" and should be released....which minics the case of</div>
<div>a supervisor going down..</div><div><br></div><div>So...</div><div>Do I maintain state external to the supervisor or..</div><div>Have the supervisor maintain state or...</div><div>Just deal with the message-storm on resource removal?</div>
<div><br></div><div>Thanks!</div><div><br></div><div>-mox</div>