Design: Distributed Order Management System
Design focuses on how to achieve eventual consistency across microservices for order, inventory, and payment. Out of scope are UI design and detailed payment gateway integration.
Functional Requirements
FR1: Allow users to place orders that update inventory and payment services
FR2: Ensure data across inventory, payment, and order services eventually become consistent
FR3: Support high availability and partition tolerance
FR4: Handle updates asynchronously to avoid blocking user requests
FR5: Provide a way to detect and resolve conflicts if data diverges
Non-Functional Requirements
NFR1: System must handle 10,000 concurrent orders per minute
NFR2: API response latency under 300ms for order placement
NFR3: Availability target of 99.9% uptime
NFR4: Data consistency can be eventual, not immediate
NFR5: Services deployed independently with separate databases