How ashish-panicker/gateway-circuit-breaker works
Discovery Service (Eureka Server)
• Acts as the centralized service registry.
• All the other services (gateway, orders, and products) register themselves here for service discovery.
Gateway Service (Spring Cloud Gateway)
• Serves as the API gateway, routing incoming client requests to the appropriate microservice.
• It may also incorporate circuit breaker functionality to handle failures gracefully, as indicated in the project title.
Order Service
• Manages order-related operations, including creating orders.
• Contains a controller, model classes, and service layer implementations.
• It also includes a REST client (ProductServiceRestClient) to communicate with the product service.
Product Service
• Manages product-related operations such as retrieving and handling bulk product requests.
• Consists of controller, model, and service components.
• Discovery Service: Label it clearly as “Eureka Server/Discovery Service” and note that it registers and tracks all available services.
• Gateway Service: Mark it as “API Gateway” and add annotations for its role in routing and as the entry point for client requests.
B. Map the Relationships and Interactions:
• In addition, illustrate communication from the Order Service to the Product Service (via the REST client) to denote that orders depend on product data.
C. Highlight Architectural Patterns and Design Principles:
• Microservices architecture, with each service deployed independently.
• Use of Spring Cloud patterns such as service discovery and API gateway routing.
• Potential circuit breaker patterns if applicable (especially in the Gateway and Order service when calling the Product service).
D. Include Relevant Technologies and Frameworks:
• Mention that each service is built with Spring Boot and managed with Maven (as seen in the file structure with Maven wrappers and pom.xml files).
• Use of Docker for containerization (each service has a Dockerfile and there is a docker-compose.yaml file for orchestration).
• Optionally, include that the services are configured using application.properties or application.yaml files.
• Use another for the API gateway.
• And different categories for backend services (Order and Product services).
• Incoming client requests → Gateway Service.
• Gateway → Order Service and Product Service.
• Order Service (internal REST Client) → Product Service.
• Microservice registration → Discovery Service.
• Clear labels for each service/component with concise descriptions (e.g., “API Gateway: Handles incoming requests and applies circuit breaker logic”).
• Rounded rectangles for microservices.
• Annotations for technologies (Spring Boot, Maven, Docker) where relevant.