Hi Brice,

Sounds like you have found your way forward.

A few curious thoughts. Are you using an Akka Cluster? Then Cluster Sharding
<http://doc.akka.io/docs/akka/2.3.6/contrib/index.html> might help you
here. It would take the role of your SessionService and manages the session
actors for you within the cluster. It also has support for passivation
(removing the session actors from memory when idle).

One thing it can't do is to know if a session actor existed previously or
not without sending a message to it.
I'm not sure I understand when you will need that. When you send the
initial message to one session actor the cluster sharding together with
akka persistence will restore the old state or create a new actor with
empty state.

Cheers,
Patrik

On Wed, Oct 22, 2014 at 5:53 PM, Brice Figureau <[email protected]>
wrote:

> Hi,
>
> On Wed, 2014-10-22 at 08:46 -0700, Richard Rodseth wrote:
> > If you have a use case that involves checking for session existence
> > without sending a command to the session, you could publish a
> > SessionCreated *domain* event (not an Akka persistence event) to the
> > "read side"  by publishing it to an Akka EventBus. The subscriber
> > could then store some query-optimized info in Cassandra as you were
> > doing before. In other words, using Akka Persistence with Cassandra
> > journal doesn't preclude you from creating "projections" in Cassandra
> > or even a relational store.
>
> That's roughly what I chose to do finally. Indeed akka-persistence
> doesn't cover all use case, and sometimes we need to add our own
> projections.
>
> > When the Reactive Streams based read side is available there will be
> > other options that let you build persistent views by aggregating
> > multiple persistent actors.
> >
> >
> > Hope this helps. I'm new to this too.
>
> Thanks, I'm new too and it's a bit hard to retrofit something written to
> a very different persistence paradigm :)
>
> --
> 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.
>



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

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