*Solution 1:* Akka persistence (the parent only) with sharding can solve that problem for you, basically the parent actor will be re-instantiated somewhere else and resume from its last state and replay any message that follows.
*Solution 2:* I used a similar concept where a type of parent is backed by an ORSet (Akka distributed data) where in case it dies, a supervisor will redistribute such ORSet among the remaining parents of its type. Messages are removed from the ORSet only after they have been processed *-think of this as a two-phase commit system-* Hope that helps, Guido. On Monday, August 22, 2016 at 9:54:12 PM UTC+1, Chandan Benjaram wrote: > > Hello all, > > I am wondering how to ensure fault tolerant way to distribute work across > remote actors!? also looking at online resource for akka implementation > patterns. Thought I would ask source for the opinion here. > > > *Here is an example:* > > I want to calculate first 1K prime numbers. Assume I have 10 actors of > same type (they take a number and return nth prime that has been passed to > it. example 1st actor might get a req like give me 1-10 primes, 2nd might > get 11-20 primes, likewise 901-1K primes for 10th actor, *order doesn't > matter*). > > this is fairly simple to solve with a single owner(parent) and 10(child) > actors. > > > However, I would like to have the *parent* to be *fault tolerantâ„¢*. For > example, the VM where the parent is running might dye at anytime(assume > faulty hardware). In that case, I want to have a another VM(assume this is > VM2) to *restart whole processing from the start*. > > > Any best practices around this need? > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
