The purpose of this project is to learn the event sourcing architecture and its implementation, and to reinforce this knowledge with a simple shopping cart example
- Postgres is used for Event Store
- Etcd is used for leader election to enable horizontal scalability for the snapshot service
- gRPC is used for client-server communication
| Method Name | Explanation |
|---|---|
| createCart | Creating new cart with user id |
| addAnItem | Add new cart item if not exist in cart. Otherwise only increased cart item quantity |
| removeAnItem | Decrease cart item quantity if cart item exist in shopping cart |
| removeItem | Remove cart item from shopping cart |
| complete | Complete shopping |
| Method Name | Explanation |
|---|---|
| getLatestAggregateStateForSnapshot | Getting snapshot needed aggregate state |
| saveSnaphot | Save needed snapshots |
- Clone Repository
git clone https://github.com/jenkem1337/grpc-event-sourcing-practice.git- Start
docker compose up --build
