Question

I want to start remote actors from my local computer using scala . Can I just start running the actors on the remote computer without manually starting a server program of some kind in the remote computer. I have a master actor which has to start some remote actors. So any ideas on how I should do it? or can I do it without executing some kind of program on the remote computer to which i have to connect first in order to start new remote actors.

Was it helpful?

Solution

You would need to have a program running on the remote side that you would have to connect to. In that program have an actor that listens for messages from your local computer and creates other actors.

For example - local side:

remoteActor ! Props(new SomeActor)

Remote side:

def receive = {
  case p @ Props(_,_,_,_) => 
    val actor = context.actorOf(p)
    sender ! actor
  //...
}

OTHER TIPS

Of course you can't; that'd be an enormous security hole!

See the akka documentation for what you need to run on the remote computer to start an akka service.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top