On Wed, Apr 8, 2015 at 6:28 PM, Dragisa Krsmanovic <[email protected]>
wrote:

> Great !
>
> In 2.4, are you still going to require same akka persistence for both
> shard regions ?
>

In 2.4, different journal plugins can be used for different persistent
actors, and we should make that configurable for cluster sharding
<https://github.com/akka/akka/issues/17158> also.
/Patrik



>
> That's another thing that complicates using akka persistence & sharding in
> an environment where you want each service to have isolated database.
>
>
>
> On Tue, Apr 7, 2015 at 11:41 PM, Patrik Nordwall <
> [email protected]> wrote:
>
>> You must start the regions on ALL nodes, i.e. you must have both these
>> lines in One.scala and Two.scala
>>
>> ClusterSharding(system).start(typeName = "ONE", ...)
>> ClusterSharding(system).start(typeName = "TWO", ...)
>>
>> I guess what you really want is to use some role for nodes hosting the
>> ONE service and another role for nodes hosting the TWO service. That is a
>> new features that will be available in Akka 2.4, see issue
>> https://github.com/akka/akka/issues/16123, which was implemented by pull
>> request https://github.com/akka/akka/pull/16136.
>>
>> Cheers,
>> Patrik
>>
>> On Wed, Apr 8, 2015 at 4:14 AM, Dragisa Krsmanovic <[email protected]>
>> wrote:
>>
>>> Sounds simple. Unfortunately I haven't been able to make one client talk
>>> to two shard regions in the same time.
>>>
>>> Here is a simple example with two shard regions:
>>> https://github.com/dragisak/akka-multi-shard-proxy
>>>
>>> I am seeing messages arriving to one shard or to the other. Haven't been
>>> able to achieve expected behavior of messages arriving to all nodes.
>>>
>>> Can you take a look to see if I haven't misconfigured something ?
>>>
>>> Thanks
>>>
>>> On Tue, Apr 7, 2015 at 4:36 AM, Akka Team <[email protected]>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> On Sun, Apr 5, 2015 at 6:05 AM, Dragisa Krsmanovic <[email protected]
>>>> > wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> We are trying to implement a microservices architecture based on Akka
>>>>> clustering.
>>>>>
>>>>> Services can be Akka workers or front end apps that call the workers.
>>>>>
>>>>> Some of the services will be using akka persistence for event
>>>>> sourcing. For those, we need to use sharding to assure that persisted
>>>>> actors don't appear on more than one node.
>>>>>
>>>>> Clients - our front end apps, can use shard regions in proxy-only mode
>>>>> to route messages to right worker nodes.
>>>>>
>>>>> Problem comes up when client needs to talk to more than one of these
>>>>> sharded services.
>>>>>
>>>>> Each of these services can form their own shard region by configuring
>>>>> different roles for Akka sharding. In that case, each service will have
>>>>> their own shard coordinator.
>>>>>
>>>>> But, in that case, I don't see a way to create multiple shard proxies
>>>>> on client to talk to different shards. How can I tell my shard proxy to 
>>>>> use
>>>>> different shard coordinators ?
>>>>>
>>>>
>>>> AFAIK this is the purpose of the "typeName" parameter on the start()
>>>> method. For different services you can use a different "typeName" String
>>>> and you can just start multiple proxies. Of course the matching services
>>>> will need a matching "typeName" parameter.
>>>>
>>>> -Endre
>>>>
>>>>
>>>>>
>>>>> The workaround has been to use a round-robin router instead of shard
>>>>> proxy which isn't ideal because it causes messages to make additional hops
>>>>> until they reach the destination.
>>>>>
>>>>> Thanks,
>>>>> Dragisa
>>>>>
>>>>>  --
>>>>> >>>>>>>>>> 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.
>>>>
>>>
>>>  --
>>> >>>>>>>>>> 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.
>>
>
>  --
> >>>>>>>>>> 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