=>parent . . . =>childA1, childA2, childA3 . . =>grandchild1, grandchild2 . . =>childB1, childB1 . . =>childB1, childB1
I had 3 Actor systems. Say i had a node N1 and when i try to create a parent and in turn creating children. It creates in the same parent which increases the load in N1 and i couldn’t distribute the load. This made me to use cluster sharding
Parent actor is starting trigger and I want to report all the child actors to its parent once it completes its execution so that I can proceed to next chain.
And I want to create actors for the above in a distribute fashion. So I have used cluster sharding and it is working fine.
I have 3 nodes named as N1, N2 and N3.
parent is created on either of the three nodes and it creates shard actor in either of above three nodes and shard actor creates child actor.
Say my parent created on N1 and it is creating shard actor on N2 and this creates child actor. But If the node N1 gets terminated due to the JVM crash then my child will become orphan and it will send reply message to dead letters.
So how to re create a parent actor for the above case.
I am using cluster sharding to create actors in a distribute fashion. Is it correct way to implement Or should I go with something else ??
Please guide me!!