Hi Prakhyat, I've the same situation (this is discussed in length in other topics)
The solution at this moment is to create another persistent actor that stores the fact that change has happened to on of your other persistent actors (probably the aggregate root) Thereafter you add a view that makes use of this change-publisher actor and starts the view that needs to process the changes for your specific persistent actor. I found that it is wise to have the persistent actor that publishes the changes to be a cluster singleton. (as you can't start it on every shard node) Kind regards, Olger On Thursday, October 9, 2014 7:38:18 PM UTC+2, Prakhyat Mallikarjun wrote: > > Hi Patrik, > > Thanks for your insight. Just saw this response now. > > I understand it is not required for persistent view to run in same JVM as > persistent actor. No issues with this at all. > > The only issue I have currently is understanding behaviour of views wrt to > shadred persistent actor? What will be impact on view if persistent actor > is rebalanced to different node? > > And also there is discussion going on to support views to pull events from > multiple persistent actors. If of the persistent actor goes down, what will > be the impact on view? > > -Prakhyat M M > > On Thursday, 9 October 2014 22:11:39 UTC+5:30, Patrik Nordwall wrote: >> >> >> >> >> >> 9 okt 2014 kl. 16:42 skrev Martynas Mickevičius < >> [email protected]>: >> >> Hi, >> >> if you want to have PersistentViews ceated on the same node as >> corresponding PersistentActors - use Cluster Sharding for PersistentViews >> as well. Just make sure that ShardResolver function resolves to the same >> Shard ID for messages meant for the corresponding PersistentActors and >> PersistentViews. >> >> >> I'm afraid that is not true. The shard allocation for two different shard >> types are independent of each other. The order of when the shards are >> requested matter, at least when using the default shard allocation strategy. >> >> On the other hand, it might matter for you where the persistent view is >> running. I can't see an advantage of running it in same jvm as the >> persistent actor. >> >> /Patrik >> >> >> >> On Thu, Oct 9, 2014 at 9:46 AM, Prakhyat Mallikarjun <[email protected]> >> wrote: >> >>> Team, >>> >>> We are taking approach of DDD with event sourcing(akka persistence). >>> PersistentActors representing aggregate roots will be sharded by UUID. Also >>> for query side we are planning to use views. >>> >>> One view will be implemented per PersistentActor. >>> >>> The persistent actor will be sharded based on UUID of aggregate roots >>> and will be distributed across multiple nodes. The behavior is run time >>> PersistentActors can be created in any clustered node. >>> >>> But what about the behavior of PersistentView? Will PersistentView's be >>> created in same JVM as PersistentActor? Want to understand how >>> PersistentView's >>> will be created in distributed nodes when PersistentActor's are shaded? >>> >>> -Prakhyat M M >>> >>> -- >>> >>>>>>>>>> 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. >> >> -- >>>>>>>>>> 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.
