In this project I built a simplified architecture of a BID/ASK Pricing Match Engine
- Spring Cloud
- Service Discovery
- Centralized Configuration
- Distributed Tracing
- Event Driven Architecture
- Centralized Logging
- Circuit Breaker
- Unit testing with https://testcontainers.com/
TODO : Secure endpoint with keycloak
- Run
mvn clean package -DskipTests
to build the applications and create the docker image locally. - Run
docker-compose up -d
to start the applications.
- Run
mvn clean verify -DskipTests
by going inside each folder to build the applications. - After that run
mvn spring-boot:run
by going inside each folder to start the applications.
Whenever the apps start, they will register their presence on the discovery server.
The discovery server will build a table that maps the app -> IP:PORT
Whenever an app wants to make an http call to another app,
it will ask the discovery server for the address.
Every client will keep a local copy of the address table in case the discovery server goes down.
Also, if in the address table we have many instances of an application,
and we fail to call one instance, the client will automatically try the next available instance.
This is useful for fault tolerance and load distribution.