Ah, this looks very nice and I agree that it sounds easier to implement, and 
would perfectly cover my use case. Hopefully it will be implemented soon :)

Thanks!
-Mario.

On 07 Jul 2014, at 14:05, Martynas Mickevičius 
<martynas.mickevic...@typesafe.com> wrote:

> Hi Mario,
> 
> your use case resonates to me with the "Hot Standby Processor" feature 
> request, that we have in our issue tracker. In that case you would have only 
> one Processor which does the writes. But next to that there would be a number 
> of Hot Views that do reads and can be promoted to the Processor if the 
> original dies.
> 
> I know this is a bit different from the idea you are proposing, but this may 
> be easier to implement than synchronizing stores of multiple processors.
> 
> 
> On Fri, Jul 4, 2014 at 7:01 PM, Mario Camou <mca...@tecnoguru.com> wrote:
> Hi everyone,
> 
> I'm in the process of thinking through a rewrite of parts of an application 
> using Akka Persistence. After watching Endre's talk from ScalaDays (I was 
> unable to attend the talk itself and the streaming only made me sadder about 
> that) I was thinking, is there a plan to apply this sort of thinking to 
> PersistentActors?
> 
> I was thinking of a cluster where you have several instances of a 
> PersistentActor, behind a Cluster-Aware Router (not using a Cluster Singleton 
> because of scalability). The thing is (as far as I've been able to 
> determine), each PersistentActor has its own state (and event store), so they 
> don't have any sort of shared (eventually-consistent) view of the world. 
> Since Akka Cluster already uses the Gossip protocol to maintain cluster 
> state, perhaps it would be interesting to extend that so that Events get 
> propagated too.
> 
> For a little more perspective, here's what I am thinking of doing. Currently 
> the application (running in a single server) holds state in in-memory Maps 
> coordinated using STM. The elements in these maps are persisted to JSON files 
> every time there's an update so that, when the system goes down and back up, 
> it can restore them. I was thinking of changing this to use Akka Persistence.
> 
> Currently a single process handles both the backend (in this case, 
> communicating with e-bike rental stations) and frontend responsibilities 
> (exposing the state via REST calls using Spray and allowing the web front-end 
> to modify the state). They both access the store via a Repository object 
> which takes care of querying and updating the Maps. I was thinking that, by 
> using Akka to access the Repository (instead of method calls) I could then 
> scale the system out by separating the frontend and backend into separate 
> nodes. That, however, still leaves me with a Single Point of Failure: the 
> Repository itself. If I could have the PersistentActors communicate amongst 
> themselves to keep an eventually-consistent view of the world, it would allow 
> me to replicate the Repository to several nodes, or perhaps not even having a 
> dedicated process to hold the PersistentActors, instead hosting them in the 
> same cluster nodes as the backend(s) and frontend(s).
> 
> As I asked earlier, is this planned at some point, is there some other 
> recommended way of going about this, or am I completely out of the ballpark?
> 
> Thanks,
> -Mario.
> 
> --
> >>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> 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 – Reactive 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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