ORIGINAL COMPANY-CONTEXT PRACTICE
Reserve a scarce retail item
Original practice scenario inspired by Hermès International Société en commandite par actions's public business context; this is not a reported interview question or a description of its internal systems. A fictional luxury retailer offers a small number of an item online while stores can also sell it. Design a short-lived reservation workflow that avoids overselling without keeping stock locked forever.
Written for independent practice using company context; this is not a verified question from a company interview.
A REASONED APPROACH
Model answer.
Model availability, reservation, and completed sale as distinct states. A reservation temporarily reduces sellable quantity and must have an authoritative expiry and a guarded conversion to a sale.
Work through it
- Choose a stock authority at the location-item grain and atomically reserve only when available quantity is sufficient. Attach a stable reservation identifier.
- Make payment completion and reservation conversion idempotent. Resolve a payment arriving after expiry with an explicit compensation or exception policy.
- Expire reservations through durable processing and reconcile stock with store updates. Test concurrent buyers, lost responses, delayed payments, and inventory corrections.
Tradeoffs to discuss
- Conservative reservations can temporarily reduce conversion, while optimistic promises increase oversell and cancellation risk. Safety stock can absorb delayed store updates.
Common pitfalls
- A browser countdown is not the expiry authority.
- Reading quantity and decrementing later without concurrency control allows two buyers to reserve the same unit.