pekko/akka-samples/akka-sample-chat
2010-03-09 22:07:14 +01:00
..
src/main/scala added final tasks (package up distribution and executable JAR) to SBT build 2010-03-09 22:07:14 +01:00
Buildfile Added the Buildr Buildfile 2010-01-28 20:07:35 +01:00
README fixed some readme typo's 2010-02-15 15:17:39 +00: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. Set AKKA_HOME environment variable to the root of the Akka distribution.
2. Open up a shell and step into the Akka distribution root folder.
3. Build Akka by invoking mvn install -Dmaven.test.skip=true. This will also build the sample application and deploy it to the $AKKA_HOME/deploy directory.
4. Run the microkernel
  export AKKA_HOME=...
  cd $AKKA_HOME
  java -jar ./dist/akka-0.6.jar
5. Now start up a new shell and go down into the ./akka-samples/akka-sample-chat directory.
6. Invoke mvn scala:console -o. This will give you a Scala REPL (interpreter) with the chat application and all its dependency JARs on the classpath.
7. Simply paste in the whole code block with the Runner object above and invoke Runner.run. This runs a simulated client session that will connect to the running server in the microkernel.
8. Invoke Runner.run again and again…

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

Thats it. Have fun.