Author: Maximilian Bundscherer
This project compares different serializers can be used in akka projects (for example in Akka Persistence or Akka Cluster).
- Java Serialization (should not be used in production)
- JSON Serialization (with Circe)
- Protobuf Serialization (with ScalaPB)
- Akka Actors (v. 2.5.18)
- Akka Persistence (v. 2.5.18)
- Circe (v. 0.10.0)
- LevelDB Java Native Interface (v. 1.8)
- Port of LevelDB to Java (v. 0.7)
- ScalaMeter (v. 0.8.2)
- ScalaPB (v. 0.8.1)
You can run this project in two modes:
ExperimentMode
: Test different serializers by timekeeping with complete Akka Actors System etc.BenchmarkMode
: Only test different serializers by ScalaMeter
First of all you should read and understand the test params. They are located in ./src/main/resources/params.conf
- Checkout project
- Go to
./
(project root folder) - Run command
sbt clean run
(clean database) - Or run command
sbt run
(non clean database)
Important: There are thrown RuntimeExceptions (Simulate crash): This behavior is desirable.
- Checkout project
- Go to
./
(project root folder) - Run command
sbt clean test
To run both modes after each other you can run command sbt mixedMode
.
To run both modes after each other and pipe outputs to files you can run command ./autoRunner.sh
(check script before you do that).
To get better results increase your default sbt memory-params with: export SBT_OPTS="-Xms1G -Xmx8G"
Xms
specifies the initial memory allocation pool.Xmx
specifies the maximum memory allocation pool.