That's probably more a design rather than implementation question. Let's say I have the folowing actor hierarchy, which forms an Akka cluster
ApiActor [API Role]
|
MasterCoordinator [API Role]
| |
SceduledJobCoordinator [Schd] StreamingJobCoordinator [Stream]
| | | |
SchdJobActor SchdJobActor StreamJobActor StreamJobActor
(I intentionally did not place seed node to save space) Api roles can be also redundant
So the workflow is obvious - users interactively/by scripting start bunch of different jobs on different worker nodes. Jobs are "fire and forget"-type, users do not wait for results, results are being written to database. Then bad thing happens - API node gets restarted or worse (destroyed, flooded, eaten by Godzilla etc). I understand that i cannot keep child actors alive, since they are part of parent actor state which is not valid anymore. If i understand correctly even router actor already acts as a parent to it's routees? Question: what is the best way of decoupling worker actors from api actors? if it's possible at all
if not then I suppose i will have to implement some kind of worker actor recovery workflow?
Thanks in advance