A gRPC-based distributed warehouse management system for CSE 5306 Distributed Systems course. The system uses a layered architecture, supports 5 core functions, and runs on 6 containerized nodes.
What is this?
- Distributed warehouse management system
- Uses gRPC for inter-service communication
- Supports CRUD operations and order processing
- Includes centralized logging
Architecture Design:
┌─────────────────┐
│ API Gateway │ ← Client request entry point
│ (Port 50050) │
└─────────┬───────┘
│ gRPC
┌─────────▼───────┐
│ Middle Services │
│ Food (50052) │
│ Electronics(50051)│
└─────────┬───────┘
│ gRPC
┌─────────▼───────┐
│ Bottom Services │
│ Fresh (50053) │
│ Appliance(50054)│
└─────────────────┘
│ gRPC
┌─────────▼───────┐
│ Logger Service │ ← Centralized logging
│ (Port 50055) │
└─────────────────┘
- Add Item Resource - Add new items to the warehouse system
- Update Item Resource - Modify existing item information
- Take Item Resource - Process orders and reduce inventory
- Query Item Resource - Query items by category, stock level, etc.
- Distributed Logging - Centralized logging of all operations
- Docker and Docker Compose
- gRPC tools
- Clone Repository
git clone https://github.com/zz9tf/Mini-Distributed-Warehouse-Management-System.git
cd Mini-Distributed-Warehouse-Management-System- Generate Protocol Buffers
./regenerate_proto.sh- Start System
# Full startup (cleans old containers)
./dev.sh
# Or simple startup
docker compose up- Stop System
# Ctrl+C to stop, or run
docker-compose down- Performance Testing
python test_client.py├── api_gateway.py # API Gateway service
├── logger_service.py # Logging service
├── test_client.py # Performance testing client
├── services/ # Business services
│ ├── food_service.py # Food service
│ ├── electronics_service.py # Electronics service
│ ├── fresh_service.py # Fresh products service
│ └── appliance_service.py # Appliance service
├── docker-compose.yml # Container orchestration
├── warehouse.proto # gRPC protocol definitions
└── dev.sh # Startup script
- No Logging Mode: 2200+ QPS, 2.2ms latency
- With Logging Mode: 43-92 QPS, 53-112ms latency
- Logging Impact: 95-98% throughput reduction