In this project, a microservice architecture is utilized, consisting of 16 modules.
At its core, the project encompasses operations such as adding products, viewing products, checking product inventory, and placing product orders within an e-commerce platform. These operations involve asynchronous and synchronous tasks, logging activities, and various other processes.
Feel free to ask if you have any further questions or need additional information!
-
Grafana and Prometheus
I use Prometheus to monitor the overall performance and traffic of all services and the system. For visualizing the data, I use Grafana.
-
Eureka:
Eureka represents the Discovery Server component. Through Eureka, we perform service discovery and ensure that these independent services operate within a dynamically scalable mechanism. Eureka tracks and provides the locations of all services, facilitating communication between them. Additionally, it enhances security within our system
-
Keycloak:
Keycloak serves as the security component of our system, directly integrated with the ApiGateway. Through Keycloak, we secure our system, ensuring that every incoming request undergoes security checks.
-
Zipkin:
With Zipkin, we can track inter-service interactions in more detail. We can access detailed information such as the passage of a request between different services and its processing time.
-
Api Gateway:
The API Gateway allows us to abstract away the complexity between services and connect them seamlessly. Essentially, it receives HTTP requests, processes them through security filters, and routes them accordingly.
-
Inventory Service and MySql Inventory Database:
When an inventory control request is received, the Inventory Service queries the inventory database to perform the necessary checks.
-
Order Service and MySql Order Database:
When an inventory control request is received, the Inventory Service queries the inventory database to perform the necessary checks.
-
Product Service and MongoDB Product Database
The Product Service handles the process of adding products to the Product Database.
-
Order Service and MySql Order Database
The Order Service handles the process of placing product orders.
1- Download or clone the project files.
2- Download Docker and setup.
3- Running the Files:
mvn build
mvn spring-boot:run
Configure New Token:
First navigate to "localhost:KeyCloakPORT" (replace PORT with the Keycloak port number) in your browser. Then, select "spring-boot-microservices" as the Realm. Proceed to the "Client" section and choose "spring-cloud-client" from the list. Navigate to the "Credentials" section and copy the "Client Secret":
You are ready to go!
Language: Bash / Shell Scripting
Technologies: - Docker and Kubernetes
Language: Spring Boot
Technologies: -Lombok -Actuator -Webflux -Crypto -Gateway
Databases: -MongoDB -MySql -Circuitbreaker
Cloud computing technologies Grafana, Prometheus
Performance analysis and monitoring technology Zipkin
Service discovery technology Netflix Eureka
Security technology Keycloak
Data streaming technologies
!!! For api key usage please read Distribution part.
POST /api/product
Body | Tip | Açıklama |
---|---|---|
name |
String |
Required . |
description |
String |
Required . |
price |
Int |
Required . |
Headers | Type | Description |
---|---|---|
Authorization |
Bearer:{{access_token}} |
Required . Your API key. |
POST /api/order
Body | Type | Description |
---|---|---|
skuCode |
String |
Required . |
price |
BigDecimal |
Required . |
quantity |
Int |
Required . |
Headers | Type | Description |
---|---|---|
Authorization |
Bearer:{{access_token}} |
Required . Your API key. |
GET /api/product
Headers | Tip | Açıklama |
---|---|---|
Authorization |
Bearer:{{access_token}} |
Required . Your API key. |
You can take a look at the Microservices Project:
Java Spring Microservices Project Docker and Kubernetes Java Spring Microservices Project Docker and Kubernetes
Important knowledge has been gained about the technologies used in microservice development.
Information about using and configuring Kafka technology with containers.
Understanding the usage of Keycloak technology, including obtaining tokens from Keycloak using Postman.
Usage and configuration of Prometheus and Grafana.
Coding and configuration of Discovery Server with Netflix Eureka.
Development of the API Gateway module.
Significant gains in understanding asynchronous and synchronous processes.
Communication between microservices.
-
@Berko01 development.
-
@ProgrammingTechie this is the resource of project. I learned and coded the project from here, and I added my improvements.