pekko/akka-samples/akka-sample-chat
2010-06-21 12:47:23 +02:00
..
src/main/scala re #281: Made all subprojects compile after breaking changes introduced by removing the type parameter from ActorRef.!!; test-compile still missing! 2010-06-21 12:47:23 +02:00
Buildfile Added the Buildr Buildfile 2010-01-28 20:07:35 +01:00
README update README docs for chat sample 2010-06-02 11:29:54 +01:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Akka Chat Client/Server Sample Application

First we need to download, build and start up Redis:

1. Download Redis from http://code.google.com/p/redis/downloads/list.
2. Step into the distribution.
3. Build: make install.
4. Run: ./redis-server.
For details on how to set up Redis server have a look at http://code.google.com/p/redis/wiki/QuickStart.

Then to run the sample: 

1. Install the Redis network storage. Download it from [http://code.google.com/p/redis/].
2. Open up a shell and start up an instance of Redis.
3. 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 console' to start up a REPL (interpreter).
4. In the first REPL you get execute: 
  - scala> import sample.chat._
  - scala> import se.scalablesolutions.akka.actor.Actor
  - scala> val chatService = Actor.actorOf[ChatService].start
5. In the second REPL you get execute: 
    - scala> import sample.chat._
    - scala> Runner.run
6. See the chat simulation run.
7. Run it again to see full speed after first initialization.

Now you could test client reconnect by killing the console running the ChatService and start it up again. See the client reconnect take place in the REPL shell.

Thats it. Have fun.