This project is a microservices-based ecommerce ordering system, demonstrating a simple product ordering flow and addressing several advanced distributed system topics.
- Cart Service: Users add products to their cart.
- Inventory Service: On checkout, the system checks inventory availability and reserves stock.
- Payment Service: Processes the payment for the order.
- Order Service: Finalizes the order and provides order listing/history for the user.
- Concurrent Request Handling: Ensures correct stock levels under high concurrency.
- Transaction Propagation Levels: Manages transaction boundaries for inventory updates.
- Locking Settings: Uses appropriate locking (e.g., pessimistic/optimistic) to prevent overselling.
- Indexing: Efficient order retrieval using database indexes.
- SAGA Pattern Implementation: Coordinates distributed transactions across services (inventory, payment, order) to ensure data consistency.
- Rollback Mechanisms: Handles failures by rolling back or compensating actions (e.g., restocking inventory if payment fails).
- api-gateway: Entry point for all client requests, routes to appropriate services.
- auth-service: Handles authentication and authorization.
- cart-service: Manages user carts.
- inventory-service: Manages product stock and availability.
- order-service: Handles order creation, listing, and SAGA orchestration.
- payment-service: Processes payments.
- config-server: Centralized configuration management.
- eureka-server: Service discovery.
- frontend: Angular-based user interface.
- Docker & Docker Compose: All services are containerized for consistent, reproducible deployments and easy local development.
- Distributed Tracing & Monitoring: Integration with tools like Spring Cloud Sleuth and Zipkin for tracing requests across services. Prometheus/Grafana or similar can be used for metrics and dashboards.
- Circuit Breakers & Resilience: Use of Resilience4j (or Hystrix) for circuit breaking, retries, and fallback mechanisms to handle service failures gracefully.
- Centralized Configuration: Config Server externalizes configuration, supporting environment-specific and dynamic updates without redeploying services.
- Service Discovery: Eureka enables dynamic registration and discovery of services, supporting scaling and resilience.
- Authentication & Authorization: JWT/OAuth2-based security for protecting APIs and user data.
- Test Coverage: Unit and integration tests for critical flows.
- Frontend Features: Modern Angular UI, API integration, and user session management.
This project demonstrates best practices for building robust, scalable, and consistent distributed systems in an ecommerce context.