Product Architecture
Concurrency Model
The system utilizes a Thread-per-Connection model. Each customer interaction is isolated into a dedicated thread, ensuring zero-latency response times during concurrent sessions.
State-Safe Queues
Orders flow through specialized LinkedBlockingQueue stages: Waiting
→ Brewing → Tray. This architecture prevents data races and ensures
FIFO integrity.
Resource Optimization
Features a unique Transfer Logic: If a client disconnects, the system automatically repurposes active "Brewing" items for other waiting customers, eliminating waste.
Persistent Logging
Real-time system state (area occupancy, customer count) is serialized to JSON via Google GSON, providing a complete audit trail of the cafe's operation.