How gz-yami/mall4cloud works
This project is a fully featured microservices-based B2B2C ecommerce system. Its architecture uses a modern Spring Cloud ecosystem (with Spring Boot, Nacos, Seata, and more) combined with popular third‐party middlewares such as MySQL, Redis, RocketMQ, Canal, ElasticSearch, and Minio for storage. The readme makes it clear that the system is designed to support a full ecommerce flow including platform management, store (merchant) management, product management, order processing, payment, and user (rbac and customer) management.
Main Components
– mall4cloud-gateway (API Gateway)
– mall4cloud-auth (Authorization and authentication service)
– mall4cloud-biz (Business utility and infrastructure functions such as image uploads and SMS)
– mall4cloud-leaf (ID generation service based on a Meituan Leaf implementation)
– mall4cloud-multishop (Merchant/service side)
– mall4cloud-order (Order service)
– mall4cloud-payment (Payment processing)
– mall4cloud-product (Product/commodity service)
– mall4cloud-rbac (User roles and permissions management)
– mall4cloud-search (Search functionality based on ElasticSearch and Canal integration)
– mall4cloud-user (User service)
• Shared Components – In addition to the core microservices, show centers for common or cross-cutting concerns. For example:
– The central service registry/discovery (Nacos)
– Distributed transaction management (Seata)
– Caching (Redis)
– Messaging system (RocketMQ)
– Persistence layer (MySQL with supporting modules for database interaction)
– File Management (Minio) and search indices (ElasticSearch)
– Common libraries (mall4cloud-common modules with aspects like caching, security, database, etc.) that are used by many services.
Relationships and Interactions
• That the service registry (Nacos) is central to dynamic discovery, and that configuration management and distributed transactions (via Seata) connect to many services.
• Messaging flows using RocketMQ that may trigger events (such as order cancel notifications, stock updates, etc.) across services and in the search module.
Architectural Patterns and Design Principles
• API Gateway Pattern – Clearly position mall4cloud-gateway as the entry point.
• Distributed Transaction Management – Highlight the usage of Seata for handling consistent business transactions across multiple services (e.g., order and payment consistency).
• Service Discovery – Emphasize the role of Nacos for registry and discovery.
• Event-Driven Communication – Represent RocketMQ (and Canal for database log streaming) signaling event based interactions.
• Layered Approach – Indicate how each service implements a structure that commonly spans from Controllers, through Service/Manager layers, down to Mappers/DAO layers.
Technologies
• External integrations such as Canal feeding changes into the Search module.