I am writing an Akka application and I want to use the Akka Cluster feature that Typsafe provides. I am trying to understand the main difference between Akka Cluster, Akka Cluster Singleton and Akka Cluster Sharding. To me, they seem to be providing similar things.
In my scenario I want to have a cluster that will have:
Based on what I have read I would need Akka Cluster for the first kind, Akka Cluster Singleton for the second kind and Akka Cluster Sharding for the third kind. Is my assumption correct? I am looking for some guidance as well as any example online if you know any.
"Stateless actors that could live in any machine" -- this sounds like akka cluster.
"Stateless actors that I want them to live in specific machines" -- this sounds like akka cluster singleton, but you can also use roles
"being able to restart the actor with its previous state if it dies" -- this sounds like Akka Cluster Sharding with akka-persistence.