Skip to content

Latest commit

 

History

History
41 lines (35 loc) · 1.06 KB

README.md

File metadata and controls

41 lines (35 loc) · 1.06 KB

Sample Project for Akka Cluster with Persistence

Intended to demonstrate a working project with Akka Clusters and Persistence.

Implemented a sharded counter.

  • Given three nodes Node 1, 2, and 3
  • And three counters C1, C2, and C3 located in the node of the same number
  • When there's a request in (Node 3) to increment counter (C1)
  • Then (Node 3) should forward the processing to (Node 1)

To test:

  • Run three processes
$ sbt "runMain com.rmpader.gitprojects.MainApp1"
$ sbt "runMain com.rmpader.gitprojects.MainApp2"
$ sbt "runMain com.rmpader.gitprojects.MainApp3"
  • Send a cURL to the three servers for varying counters
$ curl http://localhost:8081/count/1
$ curl http://localhost:8081/count/2
$ curl http://localhost:8081/count/3
$ curl http://localhost:8082/count/1
$ curl http://localhost:8082/count/2
$ curl http://localhost:8082/count/3
$ curl http://localhost:8083/count/1
$ curl http://localhost:8083/count/2
$ curl http://localhost:8083/count/3