This project demonstrates two different architectural approaches for building the same Order Management System: Monolithic and Microservices.
- Language: Go 1.21+
- Communication: gRPC, HTTP REST APIs
- Protocol Buffers: Service contracts
- Containerization: Docker + Docker Compose
- Testing: Go testing framework
- Deployment: Single binary (monolithic) vs Independent services (microservices)
- Single codebase with all services
- In-process communication
- Shared dependencies and utilities
- Simple deployment and development
- Independent services with separate codebases
- Network-based communication (gRPC)
- Independent deployment and scaling
- Technology diversity possible
oms/
├── monolithic-architecture/ # Monolithic implementation
├── microservices-architecture/ # Microservices implementation
├── docs/ # Additional documentation
└── ARCHITECTURE_COMPARISON.md # Detailed comparison
See monolithic-architecture/README.md for detailed setup instructions.
See microservices-architecture/README.md for detailed setup instructions.
Docker Compose (Recommended):
cd microservices-architecture
docker-compose up --build -dBoth implementations provide the same functionality:
- Orders Service: HTTP + gRPC APIs for order management
- Kitchen Service: Web dashboard for order visualization
- Real-time Updates: Dashboard reflects new orders immediately
- Health Checks: Service health monitoring
| Aspect | Monolithic | Microservices |
|---|---|---|
| Performance | 20,231 req/s | 110 req/s |
| Response Time | 467µs | 44ms |
| Memory | 20-30 MB | 40-60 MB |
| Communication | Function calls | gRPC network |
| Deployment | Single binary | Independent services |
📖 For detailed comparison: See ARCHITECTURE_COMPARISON.md
- Go 1.21 or later
- Protocol Buffers compiler (
protoc) - Docker (for microservices)
- Monolithic Setup - Detailed setup and usage
- Microservices Setup - Detailed setup and usage
- Architecture Comparison - Comprehensive comparison
- API Documentation - Complete API reference
Both architectures have comprehensive test suites:
- Monolithic:
cd monolithic-architecture && go test ./... -v - Microservices:
cd microservices-architecture && go test -v ./tests/integration_test.go
Monolithic: Small to medium apps, small teams, simple business logic, fast development Microservices: Large complex apps, multiple teams, different scaling needs, high availability
📖 For detailed information: See the individual README files in each architecture directory and the comprehensive Architecture Comparison.