Capstone Project - Spring Microservices - E-commerce Application #148
Replies: 9 comments 2 replies
|
@akash-coded - Can you please share the overall theory whiteboard that you used during the training hours and the demo project that you created. Really, it will help us. Thanks, |
|
@kuttiram Sorry for the delay. I was on a hiatus post the training. I have shared it all. I have been trying to upload it to the repo. But there are some merge conflicts to be addressed. Hope you have received the whiteboards. |
|
Dear @akash-coded Just I have submitted the final project assignment on the 'E-commerce Application' in the learning portal. |
|
Hey Akash, I created one producer (order), to consumers (inventory and payment), however only one listener reads the message. Can you help here. |
|
Dear @akash-coded , I have submitted the partial in the portal, but now I have completed the whole project and uploaded the source code in the GitHub link below. Please consider this version for my final project evaluation. https://github.com/niroshkumar/TCS_NIROSH_CapstoneProject/tree/Crypto-2021 Thanks |
|
Dear @akash-coded I have submitted the final project assignment on the 'E-commerce Application' in the learning portal. I have implemented few more fun here , attaching zip file, I request you to please evaluate the same. |
|
Hi Akash, waiting for your response on my issue I was facing related to api-gateway. Also please find attached the project. Bibhu Rath(TCS) |
|
Hi Akash Please find the solution for capstone project attached. Thanks |
|
Hi Akash, I have uploaded the project in LMS. Added few more tasks and uploading it here. |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Project Title: Ecommerce Platform
The purpose of this project is to design and implement a microservices-based e-commerce platform using Spring Boot, following all principles of microservices, integrating various patterns, asynchronous communications, testing strategies, and DevOps practices.
Project Modules:
1. Modelled Around Business Domain:
Each service represents a different bounded context in the ecommerce domain and implements related functionality.
2. Culture Of Automation:
Automate everything possible, from testing (unit, integration tests) to building (Maven or Gradle), to deployment (using CI/CD pipelines in Jenkins).
3. Hide Implementation Details:
Services communicate using well-defined APIs, hiding the details of their implementation. Services should adhere to the single responsibility principle.
4. Decentralize All The Things:
Each service should be independent and autonomous, responsible for its own database, and capable of being developed, deployed, and scaled individually.
5. Deploy Independently:
Each service should be containerized (using Docker) and managed independently. Use Kubernetes for orchestration, enabling independent deployment and scaling.
6. Consumer First:
Design APIs keeping the consumers in mind. Use tools like Swagger for API documentation. Implement Client-side Load Balancing using Netflix Ribbon.
7. Isolate Failure:
Use the Circuit Breaker pattern to prevent failures from cascading. Implement it using Hystrix.
8. Highly Observable:
Integrate with tools like Zipkin for tracing, Prometheus for monitoring, and ELK Stack for logs.
9. Understanding of Twelve-Factor App:
Adhere to the principles of the Twelve-Factor App in the application design, like codebase, dependencies, configuration, backing services, build-release-run, etc.
10. Microservices Patterns:
11. Asynchronous Communications:
12. Microservices Testing (Optional):
13. Microservices and DevOps (Optional):
The platform you build will be a robust, resilient, and highly scalable e-commerce platform. It will leverage the best practices of microservice architecture, using a modern tech stack and various patterns to ensure a successful implementation. Remember to follow the principles and patterns where they make sense and not to follow them dogmatically.
Steps for reference
Step 1: Setup Development Environment
Step 2: Create Spring Boot Projects
Step 3: Implement Business Logic for Each Service
Step 4: Containerize Your Services
Step 5: Create Kubernetes Configuration
Step 6: Implement API Gateway
Step 7: Implement Service Discovery
Step 8: Implement Circuit Breaker
Step 9: Implement Database Per Service Pattern
Step 10: Implement Asynchronous Communication
Step 11: Implement Testing (Optional)
Step 12: Implement DevOps (Optional)
Step 13: Implement Observability (Optional)
This is a broad overview of the steps you should follow. Each step is a significant amount of work and requires a detailed understanding of various technologies. However, with this roadmap, you should be able to start building your e-commerce platform based on microservices using Spring Boot. Always remember to start small, test as you go, and incrementally add complexity as you get comfortable with each technology.
Project Implementation: Ecommerce Platform Using Spring Boot Microservices
Introduction
This implementation manual is tailored for building an E-commerce Platform using Spring Boot, structured around microservices architecture. The goal is to adhere to microservices principles, integrate various patterns, support asynchronous communications, and apply DevOps practices for a robust, scalable, and maintainable system.
Project Modules Overview
Guidelines and Principles
Business Domain Modeling: Each service focuses on a specific domain aspect, ensuring clear boundaries and responsibilities.
Culture of Automation:
API Design and Single Responsibility Principle:
Decentralization and Service Autonomy:
Containerization and Orchestration:
Consumer-First Approach:
Failure Isolation:
Observability:
Twelve-Factor App Compliance:
Microservices Patterns:
Asynchronous Communication:
Detailed Scenarios for Implementation
Scenario 1: Product Catalog Update
Scenario 2: Handling High Order Volume
Scenario 3: Customer Profile Synchronization
Scenario 4: Inventory Shortage Notification
InventoryShortageevent. Implement event handlers in respective services.Scenario 5: Payment Service Timeout
Continuing with more detailed scenarios for the E-commerce Platform using Spring Boot Microservices:
Scenario 6: Distributed Transaction During Order Placement
Scenario 7: Real-time Updates in Product Catalog
Scenario 8: Automated Refund Process
Scenario 9: User Authentication and Authorization
Scenario 10: Load Balancing under Heavy Traffic
Scenario 11: Centralized Configuration Management
Scenario 12: Legacy System Integration
Scenario 13: Handling Partial Failures in Checkout Process
Scenario 14: Data Consistency Across Bounded Contexts
Scenario 15: Service Monitoring and Tracing
These scenarios cover a broad spectrum of challenges and tasks that a development team would encounter in building a complex, microservices-based E-commerce platform. They encompass various aspects of system design, including transaction management, inter-service communication, scalability, security, and observability, offering a comprehensive learning experience in microservices architecture.
E-commerce Platform Microservices: Event Flow, Actions, and CQRS
Product Catalog Service
ProductAdded,ProductUpdated,ProductRemoved.ProductAdded.ProductUpdated.ProductRemoved.Order Processing Service
OrderPlaced,OrderCancelled,OrderUpdated.OrderPlaced.OrderCancelled.OrderUpdated.ProductRemoved,PaymentProcessed.Customer Service
CustomerProfileUpdated.CustomerProfileUpdated.OrderPlaced,OrderCancelled.Inventory Service
InventoryUpdated.InventoryUpdated.ProductAdded,OrderPlaced,OrderCancelled.Payment Service
PaymentProcessed,RefundProcessed.PaymentProcessed.RefundProcessed.OrderPlaced,OrderCancelled.Compensating Transactions and Saga Choreography
Scenario 1: Failed Payment Processing
Scenario 2: Inventory Shortage Post Order Placement
Scenario 3: Customer Profile Update Failure
Scenario 4: Product Catalog Sync Issue
Scenario 5: Order Cancellation Failure
Circuit Breaker Usage Scenarios
Scenario 1: Overloaded Customer Service
Scenario 2: Payment Service Timeout
Flow of Events Between Microservices for CQRS
Relationships Between Command and Query Sides in CQRS
OrderPlacedandOrderCancelled.Detailed Scenarios for Inter-Service Communications and Design Patterns
Scenario 6: Implementing the Strangler Pattern
Scenario 7: Utilizing the API Gateway Pattern
Scenario 8: Proxy Pattern for Third-Party Integrations
Scenario 9: Aggregator Pattern for Unified Customer Dashboard
Scenario 10: Implementing Chained Patterns for Order Fulfillment
Asynchronous Communication Strategies
Scenario 11: Asynchronous Order Processing
Scenario 12: Event-Driven Inventory Updates
Failure Scenarios and Circuit Breaker Implementation
Scenario 13: Inventory Service Downtime
Scenario 14: External Communication Failure
Conclusion
These scenarios, patterns, and strategies provide a roadmap for developing a sophisticated E-commerce Platform using Spring Boot microservices. They emphasize the importance of designing a system that is resilient, scalable, and capable of handling real-world challenges in e-commerce operations. By implementing these guidelines, developers will gain valuable insights into microservices architecture, enabling them to build advanced, enterprise-level applications.
All reactions