Example of an application in Spring Boot and Netflix OSS using fundamentals of best practices microservice architecture.
- Java SE Development Kit
- Spring Tools IDE
- Maven
- Docker
- DDD
- TDD
- Clean Code
- Solid
- The project follows CloudNative recommendations and The twelve-factor app .
- Configuration Management
- Dynamic Scalling Up and Down
- Load Distribution
- Visibility and Monitoring
- Common Feature Implementation
- Fault Tolerance
Microservices | Description |
---|---|
Service Discovery | Eureka server |
Authorization-Service | Port:8085 Responsible to allow access to microservices |
Ticket-Service | Port:9192 Responsible to provide access to ticket |
Payment-Service | Port:9191 Responsible to process payments from ticket or products |
Product-Service | Port:9193 Responsible to provide products |
Config-Server | Port:9196 Responsible to provide information and parameters for common application properties |
#container responsible to storage cache
docker run -it --name redis -p 6379:6379 redis:5.0.3
#container responsible to persist ticket data
docker run -- name db_postgres -e POSTGRES_PASSWORD=your_password -p 5432:5432 -d postgres
#container responsible to persist payment data
Docker run –- name mongodatabase -p 27017:27017 -d -t mongo
Cache is one of the approaches to optimize access to systems data, where we avoid repetitive requests in the original data sources, which are usually large structures, complex and not always performance, so with cache, we start to consult more optimized locations, which provide quick access through keys.
Configuration Using with @CacheEvict and @Cacheable annotations
The Hystrix Dashboard allows you to monitor Hystrix metrics in real time.
Stack | Description |
---|---|
Elasticsearch | NoSQL database based on the Lucene search engine |
Logstash | Log pipeline tool that accepts inputs/logs from various sources |
Kibana | Kibana is a visualization UI Layer |
Capture logs from Logstash
Custom Dashboard with Kibana