Removing the Client Managed Remote Actor sample from the docs and akka-sample-remote, fixing #804

This commit is contained in:
Viktor Klang 2011-04-27 13:49:50 +02:00
parent 5068f0d48a
commit 71a7a92273
2 changed files with 1 additions and 68 deletions

View file

@ -1,10 +1,5 @@
---------------------------------------------------------
== Akka Remote Sample Application ==
This sample has two different samples:
- Server Managed Remote Actors Sample
- Client Managed Remote Actors Sample
---------------------------------------------------------
= Server Managed Remote Actors Sample =
@ -29,31 +24,4 @@ To run the sample:
Now you could test client reconnect by killing the console running the ServerManagedRemoteActorClient and start it up again. See the client reconnect take place in the REPL shell.
Thats it. Have fun.
---------------------------------------------------------
= Client Managed Remote Actors Sample =
To run the sample:
1. Fire up two shells. For each of them:
- Step down into to the root of the Akka distribution.
- Set 'export AKKA_HOME=<root of distribution>.
- Run 'sbt'
- Run 'update' followed by 'compile' if you have not done that before.
- Run 'project akka-sample-remote'
- Run 'console' to start up a REPL (interpreter).
2. In the first REPL you get execute:
- scala> import sample.remote._
- scala> ClientManagedRemoteActorServer.run
This starts up the RemoteNode and registers the remote actor
3. In the second REPL you get execute:
- scala> import sample.remote._
- scala> ClientManagedRemoteActorClient.run
4. See the actor conversation.
5. Run it again to see full speed after first initialization.
Now you could test client reconnect by killing the console running the ClientManagedRemoteActorClient and start it up again. See the client reconnect take place in the REPL shell.
Thats it. Have fun.
Thats it. Have fun.

View file

@ -1,35 +0,0 @@
/**
* Copyright (C) 2009-2011 Scalable Solutions AB <http://scalablesolutions.se>
*/
package sample.remote
import akka.actor.Actor._
import akka.actor. {ActorRegistry, Actor}
import Actor.remote
class RemoteHelloWorldActor extends Actor {
def receive = {
case "Hello" =>
self.reply("World")
}
}
object ClientManagedRemoteActorServer {
def run = {
remote.start("localhost", 2552)
}
def main(args: Array[String]) = run
}
object ClientManagedRemoteActorClient {
def run = {
val actor = remote.actorOf[RemoteHelloWorldActor]("localhost",2552).start()
val result = actor !! "Hello"
}
def main(args: Array[String]) = run
}