Sorry, I didn't explain it correctly. I have 3 roles not two.

Frontend

Command (Backend insert of data with Persistent Actors)
Query (Backend query with views)

So, for now, sounds like my strategy of having three ActorSystems on the 
front end (Application, Command, Query) is the way to go till 2.4 comes out 
when I will change it to use the roles in the ShardRegion itself.

Now if I can only figure out why my replies from the query cluster are 
disappearing... https://groups.google.com/forum/#!topic/akka-user/iXWVGlEWo50

Chanan.

On Monday, May 4, 2015 at 3:03:06 AM UTC-4, Patrik Nordwall wrote:
>
>
>
> On Fri, May 1, 2015 at 1:19 PM, Chanan Braunstein <[email protected] 
> <javascript:>> wrote:
>
>> Hi Patrik,
>>
>> What/where is the limited support for roles in 2.3, do you mean the 
>> config option: akka.contrib.cluster.sharding.role ?
>>
>> If so, that would only work for one role type, right?
>>
>
> It is reading the role from 
> configuration akka.contrib.cluster.sharding.role.
> It is possible to have different values of this on different nodes, e.g. 
> use "Command" on some backend nodes and "Query" on some other nodes.
> The limitation is that you cannot have a node with several nodes, i.e. 
> hosting shards for different roles.
>  
>
>>
>> What I did for now till 2.4 comes out, please let me know if this is not 
>> a good idea, is create two ActorSystems on the front end, one for each 
>> role, so when I want to use a an actor from the "Command" role, I create 
>> the ShardingRegion on that ActorSystem, and same for the "Query" role. Does 
>> that make sense for now?
>>
>
> That is a creative workaround, but I don't understand why that would be 
> needed. In the frontend nodes you can 
> configure akka.contrib.cluster.sharding.role to something else than 
> FrontEnd (e.g. Command) and then those will start in proxy mode since the 
> node does not satisfy the configured akka.contrib.cluster.sharding.role.
>
> /Patrik
>  
>
>>
>> On Wednesday, April 29, 2015 at 11:34:23 AM UTC-4, Patrik Nordwall wrote:
>>>
>>>
>>>
>>> On Wed, Apr 29, 2015 at 3:08 PM, Chanan Braunstein <
>>> [email protected]> wrote:
>>>
>>>> Thanks Konrad, I will wait till 2.4.
>>>>
>>>> However, thinking about this a bit more adding cluster roles only 
>>>> solves half the problem. The other issue is that I need to have the actor 
>>>> class on the "local" machine to get a ClusterShard. What I would like to 
>>>> do 
>>>> is to implement CQRS/ES like this:
>>>>
>>>> Play servers (fronted by HAProxy) - Cluster Role: FrontEnd
>>>>
>>>> Akka cluster with Persistent actor - Cluster Role: Command
>>>>
>>>> Akka cluster with Persistent views - Cluster Role: Query
>>>>
>>>> Once cluster roles are in place, this will let me do this, however I 
>>>> would still need the source code of the the two cluster to be on the 
>>>> frontend because IU need the actor class on the front end. Really it is 
>>>> not 
>>>> need there it is only used by the two back end cluster, I hesitate to say 
>>>> this, but it might be better to give the class name as a string... Not 
>>>> ideal either, but it will decouple the back end from the front end.
>>>>
>>>
>>> I'm not sure I understand the problem, but would like to mention that 
>>> the entryProps is optional, i.e. you can have sharding regions on front end 
>>> nodes that only act as proxies. Also, there is some limited support for 
>>> roles in cluster sharding in 2.3.x.
>>>
>>> /Patrik
>>>  
>>>
>>>>
>>>> Chanan
>>>>
>>>>
>>>> On Wednesday, April 29, 2015 at 5:33:41 AM UTC-4, Akka Team wrote:
>>>>>
>>>>> Hello there,
>>>>> This new feature will be part of the 2.4.x release which we'll soon 
>>>>> start working on to get over through the finish-line - no hard timeline 
>>>>> for 
>>>>> it but "soon" :-)
>>>>> If you need it back-ported to 2.3.x we can do this for our customers - 
>>>>> in general new features are not added to maintanance relases.
>>>>>
>>>>> -- Konrad
>>>>>
>>>>> On Tue, Apr 28, 2015 at 6:33 PM, Chanan Braunstein <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> It looks like this is currently no way to specify a role for a 
>>>>>> ClusterShard to be on in the cluster. There is a pull request that was 
>>>>>> merged in Oct 2014 that adds roles to ClusterShards:
>>>>>>
>>>>>> https://github.com/akka/akka/issues/16123
>>>>>>
>>>>>> Will that be in the point release of Akka, and if so, is there a date 
>>>>>> for that?
>>>>>>
>>>>>> Thanks,
>>>>>> Chanan
>>>>>>
>>>>>> -- 
>>>>>> >>>>>>>>>> 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.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> Akka Team
>>>>> Typesafe - Reactive apps on the JVM
>>>>> Blog: letitcrash.com
>>>>> Twitter: @akkateam
>>>>>  
>>>>  -- 
>>>> >>>>>>>>>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> 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