Sample e-commerce application built on top of Akka and EventStore following a CQRS/DDDD-based approach. Makes use of Akka DDD framework.
Currently only basic Sales/Reservation autonomous service is available. Autonomous service consist of 4 executable units (Akka Microkernel bundles).
Business logic encapsulated inside Aggregate Roots. Starts as backend cluster node.
Technologies: Akka Persistence, Akka Cluster Sharding
Http server forwarding commands to backend cluster.
Technologies: Akka-Http, Akka Cluster Client
Service that consumes events from event store and updates view store (Postgresql database).
Technologies: EventStore JVM Client, Slick
Http server providing rest endpoint for accessing view-store.
Technologies: Akka-Http, Slick
docker run --name ecommerce-event-store -d -p 2113:2113 -p 1113:1113 jmkelly/eventstore
Go to http://127.0.0.1:2113/web/index.html#/projections and click Enable All
button to enable system projections.
docker run --name sales-view-store -d -p 5432:5432 postgres
Postgres console: psql -h localhost -p 5432 -U postgres
sbt stage
For each sales-* bundle there is a corresponding run script: run-sales-{unit name}
- Create reservation
http POST http://127.0.0.1:9100/ecommerce/sales Command-Type:ecommerce.sales.CreateReservation reservationId="reservation-200" clientId="client-1"
- Display all reservations
http GET localhost:9300/ecommerce/sales/reservation/all