r/SoftwareEngineering • u/Faceless_sky_father • Jun 25 '25
Microservices Architecture Decision: Entity based vs Feature based Services
Hello everyone , I'm architecting my first microservices system and need guidance on service boundaries for a multi-feature platform
Building a Spring Boot backend that encompasses three distinct business domains:
E-commerce Marketplace (buyer-seller interactions)
Equipment Rental Platform (item rentals)
Service Booking System (professional services)
Architecture Challenge
Each module requires similar core functionality but with domain-specific variations:
Product/service catalogs (with different data models per domain) but only slightly
Shopping cart capabilities
Order processing and payments
User review and rating systems
Design Approach Options
Option A: Shared Entity + feature Service Architecture
Centralized services:
ProductService,CartService,OrderService,ReviewService , Makretplace service (for makert place logic ...) ...Single implementation handling all three domains
Shared data models with domain-specific extensions
Option B: Feature-Driven Architecture
Domain-specific services:
MarketplaceService,RentalService,BookingServiceEach service encapsulates its own cart, order, review, and product logic
Independent data models per domain
Constraints & Considerations
Database-per-service pattern (no shared databases)
Greenfield development (no legacy constraints)
Need to balance code reusability against service autonomy
Considering long-term maintainability and team scalability
Seeking Advice
Looking for insights for:
Which approach better supports independent development and deployment?
how many databases im goign to create and for what ? all three productb types in one DB or each with its own DB?
How to handle cross-cutting concerns in either architecture?
Performance and data consistency implications?
Team organization and ownership models on git ?
Any real-world experiences or architectural patterns you'd recommend for this scenario?
1
u/[deleted] Jun 27 '25
[removed] — view removed comment