how to instance a single actorOf based on several nodes ?

16 views
Skip to first unread message

bruno darrigues

unread,
May 22, 2012, 6:43:48 AM5/22/12
to Akka User List
Hi,

Actually, i can instanciate an actor on sevral nodes via a router and
based on the number of instances, the router could route on the
different replicated node.

However, my need is to have one parent to allocate unique actors among
several nodes.
per example a service-factory-a wich create instances service-a-
instance-a1 on node 0, service-a-instance-2 on node1, ....

each children are in for akka://Node0/service-a/service-a-instance-1,
akka://Node0/service-a/service-a-instance-2, ...

actualy i can't use router because if i specify nb-instance 1, it only
create local instance.

may i developp a custom router to allocate a single actor among
nodes ? may i wait for cluster snapshot ?

in a distributed application, the key point is to identify the unique
actor who is able to create new instances, is it a stupid feature to
have a custom router to route some kind of message to the leader of
the cluster (wich could change in the time) ?

Best regards
Bruno

Patrik Nordwall

unread,
May 22, 2012, 8:04:02 AM5/22/12
to akka...@googlegroups.com
I'm not sure I follow what you are trying to do, but could it be that the remote deployment feature is what you are looking for? No router needed.
Bruno

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.




--

Patrik Nordwall
Typesafe The software stack for applications that scale
Twitter: @patriknw


bruno darrigues

unread,
May 22, 2012, 4:47:22 PM5/22/12
to Akka User List
thx Patrick, i think i have to build a spawn strategy , get the nodes
ring of a cluster and choose one to remote deploy.

regards
Bruno


On 22 mai, 14:04, Patrik Nordwall <patrik.nordw...@gmail.com> wrote:
> I'm not sure I follow what you are trying to do, but could it be that the
> remote deployment feature is what you are looking for? No router needed.http://doc.akka.io/docs/akka/2.0.1/scala/remoting.html#creating-actor...
>
> On Tue, May 22, 2012 at 12:43 PM, bruno darrigues <bruno.darrig...@gmail.com
> Typesafe <http://typesafe.com/> -  The software stack for applications that
> scale
> Twitter: @patriknw
Reply all
Reply to author
Forward
0 new messages