Design a scalable coffee ordering notification system
Company: Salesforce
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
Design an **online coffee ordering system**.
### Core flow
- Customers browse menus for nearby coffee stores, place orders, and pay.
- Coffee stores receive orders, accept/reject, prepare them, and mark them ready.
- Customers receive real-time status updates (e.g., accepted, in progress, ready).
### Focus areas
- How to **scale** the system (many stores, many customers, peak traffic).
- How to coordinate **notifications** between customer and coffee store reliably.
### Deliverables
- APIs/services and data model
- Order state machine and concurrency handling
- Notification mechanisms (push/SMS/websocket), retries, and idempotency
- Scalability, partitioning, and operational metrics
Quick Answer: This question evaluates a candidate's ability to design scalable, real-time distributed systems with emphasis on order lifecycle management, reliable notification delivery, concurrency control, data modeling, and operational metrics.