This project is based on Tiny Event Sourcing library
This example uses Postgres as an implementation of the Event store. You can see it in pom.xml:
<dependency>
<groupId>ru.quipy</groupId>
<artifactId>tiny-postgres-event-store-spring-boot-starter</artifactId>
<version>${tiny.es.version}</version>
</dependency>
Thus, you have to run Postgres in order to test this example. Postgres service is included in docker-compose file that we have in the root of the project.
https://andrsuh.notion.site/2595d535059281d8a815c2cb3875c376?source=copy_link
https://andrsuh.notion.site/2625d5350592801aaf88c7c95302d10c?source=copy_link
Set of the services you need to start developing and testing process is following:
- Bombardier - service that is in charge of emulation the store's clients activity (creates the incoming load). Also serves as a third-party payment system.
- Postgres DBMS
- Prometheus + Grafana - metrics collection and visualization services
You can run all beforementioned services by the following command:
docker compose -f docker-compose.yml up
To make the application run you can start the main class OnlineShopApplication. It is not being launched as a docker contained to simplify and speed up the devevopment process as it is easier for you to refactor the application and re-run it immediately in the IDE.
The command git remote -v should include the following lines:
upstream https://github.com/andrsuh/high-load-course.git (fetch)
upstream https://github.com/andrsuh/high-load-course.git (push)
If not, add the upstream remote:
git remote add upstream https://github.com/andrsuh/high-load-course.git
To pull changes from the main repository, run the following commands:
git fetch upstream
# switch to the main branch of your fork. Make sure the branch has no uncommitted changes to avoid conflicts
git checkout main
# merge changes from the main repository into your main branch
git merge upstream/main