Cluster-sharding "BlogApp" lab based on a Lightbend tutorial
This is the reworked version of the Akka sharded persistent actors example provided by Lightbend.
- The chosen plugin for persistent storage is by Dennis Vriend.
- The database chosen is Postgres.
- Post representation has been transformed from the persistent actor to FSM
- Kryo serialization is used for serializing commands and events.
- The "Query" sql view is populated: es_post table.
There are the two bots generating events. The first one, PostCreatorBot, creates, edits and publishes the post for each author. The second one, ChiefEditorBot, removes 5 oldest posts for each author. Both bots act periodically in a self-scheduled manner.
- Create a Postgres database schema and configure the datasource in \src\main\resources\postgres-application.conf
- Execute a run-once sql script located at main\resources\schema\postgres\postgres-schema.sql
-
- Run the first cluster node:
sbt "run 2551" - Run the second cluster node:
sbt "run 2552" - Run the managing node:
sbt "run 0"
- Run the first cluster node:
- Make sure that the journal, snapshot and all es_ tables are correctly populated.
This source code is made available under the Apache 2.0 License