Re: [akka-user] Create an FSM actor outside a cluster and initialize it with references to another actors in the cluster

2014-12-15 Thread Björn Antonsson
Hi Eugene,

You could have the creation of actor A (and subsequently the B actors) done by 
a master actor that represents a service inside the cluster, and the response 
you get from that master contains a named topic or something similar where the 
FSM can communicate with the A actor.

Have you looked at the distributed workers Activator template? It uses the 
cluster singleton as well as the cluster client to implement fan out of work to 
multiple nodes.

B/

On 12 December 2014 at 17:50:52, Eugene Dzhurinsky (jdeve...@gmail.com) wrote:

Hi, Björn!

Thanks for the response.

The biggest problem is that the original system was developed without any 
clustering in mind - so on every request from the client, a new FSM actor is 
created, some pre-defined references to worker actors are passed to the FSM 
actor and then it orchestrates the workers to get the job done.

Now the part of the system has to go distributed - so the part of the job could 
be split into chunks by the actor A, which has subset of actors B.

What I want to do now is to introduce a cluster, which will manage actors A and 
B (nodes with roles etc). So when an actor FSM is created - it will create 
some references of actors A (which in turn will create references to B) - and 
pass the reference to A to the FSM.

I don't really want to put the FSM actor into the cluster for the moment, 
because it will require to re-build some dependent things (queue etc).
--
 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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
Björn Antonsson
Typesafe – Reactive Apps on the JVM
twitter: @bantonsson

-- 
  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Create an FSM actor outside a cluster and initialize it with references to another actors in the cluster

2014-12-12 Thread Eugene Dzhurinsky
Hi, Björn!

Thanks for the response.

The biggest problem is that the original system was developed without any 
clustering in mind - so on every request from the client, a new FSM actor 
is created, some pre-defined references to worker actors are passed to the 
FSM actor and then it orchestrates the workers to get the job done.

Now the part of the system has to go distributed - so the part of the job 
could be split into chunks by the actor A, which has subset of actors B.

What I want to do now is to introduce a cluster, which will manage actors A 
and B (nodes with roles etc). So when an actor FSM is created - it will 
create some references of actors A (which in turn will create references 
to B) - and pass the reference to A to the FSM.

I don't really want to put the FSM actor into the cluster for the moment, 
because it will require to re-build some dependent things (queue etc).

-- 
  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Create an FSM actor outside a cluster and initialize it with references to another actors in the cluster

2014-12-11 Thread Eugene Dzhurinsky
Hello!

I have an FSM actor. which takes a number of references to worker actors 
in it's constructor. That works very well if there's a single actor system.

Now I want to create another worker actor *in the cluster* and get a 
reference to this actor in the FSM actor *outside of the cluster*, so it 
will be able to send messages to the clustered actor and receive responses.

I don't need to create those worker actors in the cluster in advance - only 
when needed (and the number of created actors may vary).

This new worker actor will create and coordinate subset of  another actors 
in the cluster. not visible to the FSM actor.

I've studied the *Cluster Client*, but it seems that the ClusterClient may 
only work with some pre-existing actors and can't create new ones on demand.

Please advice.

Thanks!

-- 
  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.