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

Reply via email to