Hi Brice, I had a similar need for operational visibility. The approach I took was to create a ShardAllocationStrategy and configure my cluster to use it. The strategy would save off the allocations so that they could inspected later. Specifically, the ShardAllocationStrategy took an ActorSelection and then sent a message with the state to the selection. The strategy has worked pretty well so far.
Brandon On Friday, June 26, 2015 at 2:57:35 AM UTC-7, Brice Figureau wrote: > > Hi, > > I'm currently adding a management system to my Akka Cluster which adds a > REST API, allowing to introspect some specific parts of the system > (basically some important actor states). > > This cluster is using several ClusterSharding and ClusterSingletons. One > thing I'd like to provide is to be able find on which node a specific > shard and shard entry is running through this API, along with a view of > where is running what (ie creating a map of the ActorSystem per nodes, > or the cluster itself). > > There doesn't seem to be an easy way to do that (ClusterSharding don't > support introspections). The only solution I found is this StackOverflow > answer: > > http://stackoverflow.com/questions/25860939/how-print-all-actors-in-akka-system > > > I could adapt it to locate where the singletons are running, and for the > ClusterSharding identify recursively all known regions, but this feels a > bit clumsy. > > I was wondering if there would be a better way to do that? > Thanks! > -- > Brice Figureau <[email protected] <javascript:>> > > -- >>>>>>>>>> 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.
