tree: c3cd51eafec1b0b559ede1f621f0548e13d48772 [path history] [tgz]
  1. project/
  2. src/
  3. build.sbt
  4. README.md
pekko-sample-persistence-dc-scala/README.md

Apache Pekko Replicated Event Sourcing Multi DC Sample

This is an example project demonstrating Apache Pekko Replicated Event Sourcing to run a replica per datacenter.

How to run

  1. In terminal 1: sbt "runMain sample.persistence.res.MainApp cassandra"

  2. In terminal 2: sbt "runMain sample.persistence.res.MainApp 7345 eu-west"

  3. In terminal 3: sbt "runMain sample.persistence.res.MainApp 7355 eu-central"

  4. In terminal 4:

    • To add a thumbs-up for resource pekko from user u1 in DC eu-central: curl -X POST http://127.0.0.1:27355/thumbs-up/pekko/u1
    • To add a thumbs-up for resource pekko from user u2 in DC eu-west: curl -X POST http://127.0.0.1:27345/thumbs-up/pekko/u2
    • To get the users that gave thumbs-up for resource pekko: curl http://127.0.0.1:27355/thumbs-up/pekko
    • Note the port numbers 27355 for eu-west and 27345 for eu-central