Skip to content

This project compares different serializers can be used in akka projects (for example in persistence or cluster)

License

Notifications You must be signed in to change notification settings

maxbundscherer/akka-serialization-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Akka Serialization Comparison

shields.io

Author: Maximilian Bundscherer

Overview

This project compares different serializers can be used in akka projects (for example in Akka Persistence or Akka Cluster).

Which serializer does this work compares?

  • Java Serialization (should not be used in production)
  • JSON Serialization (with Circe)
  • Protobuf Serialization (with ScalaPB)

Requirements

  • Java JDK (JDK 8)
  • Scala (v. 2.12.7 or higher - normally shipped with sbt)
  • Sbt (v. 1.2.6 or higher)

Included dependencies

Let´s get started

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

Start ExperimentMode

  1. Checkout project
  2. Go to ./ (project root folder)
  3. Run command sbt clean run (clean database)
  4. Or run command sbt run (non clean database)

Important: There are thrown RuntimeExceptions (Simulate crash): This behavior is desirable.

Start BenchmarkMode

  1. Checkout project
  2. Go to ./ (project root folder)
  3. Run command sbt clean test

Advanced

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).

Increase default sbt memory-params

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.

About

This project compares different serializers can be used in akka projects (for example in persistence or cluster)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published