Trading Sample with Scala and Akka.

Including performance benchmark test described in blog: http://blog.jayway.com/2010/08/10/yet-another-akka-benchmark/

=== Latest Results ===

* 1.0-M1
With order matching: http://goo.gl/EsUwr
Without order matching: http://goo.gl/UOCd2
Comparing with previous: http://goo.gl/eaoOC


=== How to run benchmark from distribution ===

Download and unzip distribution assembly from http://github.com/patriknw/akka-sample-trading/downloads
The zip contains all jar files, including necessary dependencies.

In the scripts directory of the distribution there is a run_benchmark.sh script that can be used to launch tests.

Argument to the script is the junit test class or classes to run.
./run_benchmark.sh org.samples.trading.akka.AkkaPerformanceTest

There is also a script for running all benchmark tests.
./run_all_benchmarks.sh

You need to define JAVA_HOME for JDK6, if you don't have it as default.

Benchmark options can be defined with variable:
export BENCH_PROPS='-DuseTxLogFile=false -Dbenchmark=true -DminClients=1 -DmaxClients=40 -DuseDummyOrderbook=false'

Better accuracy (running tests longer) is achieved if you define jvm parameter:
-Dbenchmark=true

By default the benchmark is run without transaction logging, you can use transaction logging by defining jvm parameter:
-DuseTxLogFile=true

By default the benchmark is run with 1 to 40 client threads, you can define another range with jvm parameters:
-DminClients=2 -DmaxClients=6

To push the message passing to the limits, the order matching logic can be turned off with jvm parameter:
-DuseDummyOrderbook=true

To control how long the tests are running you can define repeatFactor, default is 50 when benchmark=true:
-DrepeatFactor=100

To control the length of the warmup period you can define warmupRepeatFactor, default is 100 when benchmark=true:
-DwarmupRepeatFactor=200