Hi Wolfgang, The idea behind event sourcing and persistent actors is that you should at all times be able to reconstruct the internal state of the actor by replaying the events that it has stored. The snapshot mechanism is an optimization whereby you can save the state at a certain event so that you can start to recover/replay from that point and not the beginning of time.
If your snapshots contain state that you can't reconstruct from your stored events, then your actors are not persisten. How would they recover from a crash? There is no graceful shutdown if your machine fails. If your stats are sensistive, then they need to be persisted as events, or you need to be able to reconstruct them from your persisted events. B/ On 5 November 2014 at 17:53:01, Wolfgang Friedl ([email protected]) wrote: Hi together! The actors created by our cluster-shard are persistent-actors. Currently we have implemented an graceful shutdown mechanism (by using the gracefulshutdown function form Akka) which sends a customized message to our actors giving them time to shutdown gracefully, which in our case means saving a Snap-Shot and wait for the SnapshotSuccess/failed message. In the case a re-balance is done by the Cluster-Shared the actors are killed via a Poisenbill. So we have to save our snapShot in the postStop() function. In this case we do not have the possibility to wait for the SnapShotSuccess/Failed message. I only could listen on DeadLetter for this messages. The Snapshots includes the stats of our actor which is quite sensitive, so the risk is high that in the case of a re-balance some sensitive data are set to a wrong (old value). I guess customized "re-balancing" messages are not planned? Is there a proper way saving this problem? Regards Wolfgang -- >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Björn Antonsson Typesafe – Reactive Apps on the JVM twitter: @bantonsson -- >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
