// create the address object that points to the remote server
Address addr = new Address("akka", "ServerSys", "127.0.0.1", 2552);
// creating the ServerActor on the specified remote server
final ActorRef serverActor = system.actorOf(new Props(ServerActor.class)
.withDeploy(new Deploy(new RemoteScope(addr))));
// create a local actor and pass the reference of the remote actor
actor = system.actorOf(new Props(new UntypedActorFactory() {
public UntypedActor create() {
return new ClientActor(serverActor);
}
}));
// send a message to the local client actor