On Wed, Jan 21, 2015 at 5:04 PM, Brice Figureau <[email protected]>
wrote:

> Hi,
>
> I'm trying to implement persistence of entries (as in their presence not
> their data) in a ClusterSharding based system. For the moment I have a
> persistent ClusterSingleton that creates all entries, so that in the
> event of a full cluster restart every running entries would be
> re-created (by sending them an Init message).
>
> The only issue is that (before ClusterSharding) this singleton was
> watching the created child so that it knew when those would disappear
> (and thus know processing is over for this entry).
>
> In the ClusterSharding, is there a way to do that, beside sending the
> Passivate also to my singleton?
>
> Next, I've noticed that Akka master ClusterSharding seems to implement
> what I did with the "rememberEntries" parameter, in certainly a
> clever/better way than my poor-man's implementation. Is this new contrib
> compatible with the latest Akka 2.3?
> How to use this newer version?
>

This feature has been merged
<http://doc.akka.io/docs/akka/snapshot/contrib/cluster-sharding.html> to
the master branch which is the upcoming 2.4 release in a couple of months.
You can give it a spin using snapshot
<http://doc.akka.io/docs/akka/snapshot/intro/getting-started.html> version
of Akka. Documentation on this can also be found on the cluster sharding
page
<http://doc.akka.io/docs/akka/snapshot/contrib/cluster-sharding.html#Remembering
Entries>.


>
> And finally, is there a way to roughly get access to the list of running
> entries (their ids for instance) in a given cluster? Or at least to ask
> the local Region for the entries running on a given node?
> This is so that I can provide this information to a management layer we
> have on our system.
>

This new feature also enables to start a PersistentView that would get
updates of entry starts and stops in the shard. Entry state changes are
persisted by the Shard persistent actor
<https://github.com/akka/akka/blob/4437f775e5c49f534b2d19e846943f81e8cf476d/akka-contrib/src/main/scala/akka/contrib/pattern/ClusterSharding.scala#L1022>
.


>
> Thanks!
> --
> Brice Figureau
> My Blog: http://www.masterzen.fr/
>
> --
> >>>>>>>>>>      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.
>



-- 
Martynas Mickevičius
Typesafe <http://typesafe.com/> – Reactive
<http://www.reactivemanifesto.org/> Apps on the JVM

-- 
>>>>>>>>>>      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.

Reply via email to