Design a Physical DVD Rental and Delivery Platform
Allocate physical DVD copies from member queues, coordinate shipment, and return inspected copies to circulation without duplicate rentals.
Problem statement
For this exercise, assume a physical DVD rental service has members, a title catalog, individually barcoded disc copies and several fulfillment centers. A member maintains an ordered queue of up to 20 desired titles.
When that member has no active rental, the service chooses the first currently available title in the queue, assigns one available copy from an eligible center, and starts one outbound shipment. A title is catalog metadata; a copy is one physical unit and cannot serve two active rentals.
For this exercise, a member may have one active rental, including reserved, outbound, with-member and returning states. Queue edits affect future allocations and do not cancel an allocated rental. A carrier status update or a member’s return claim does not make a copy available.
A fulfillment center must physically receive and inspect the identified copy against its rental/return identity before the rental closes and that copy returns to available stock. Damaged, unexpected or uncertain copies remain quarantined for controlled reconciliation.
Duplicate or out-of-order scans must not create another shipment, release a newer rental, or move a completed rental backward.
Show member queue/status APIs, copy allocation, warehouse pick/pack and carrier handoff, shipment observations and the return-to-next-rental path. Make a lost handoff response or delayed return visible rather than guessing that the disc is free.
Use a bounded center-eligibility and availability policy; detailed vehicle routing, billing, plan pricing, recommendations, digital streaming and DVD manufacturing are outside scope. These are practice assumptions for physical-disc circulation, not claims about a particular company’s historical operations.
What to build
- Members browse titles, maintain an ordered desired-title queue and inspect their current rental and shipment status.
- Allocate one available physical copy to an eligible member and create one recoverable pick/pack/shipment workflow without violating copy or member active-rental limits.
- Match physical returns and inspection to their rental, close it safely and make eligible returned copies available for later allocations.
- Process duplicate or delayed warehouse/carrier observations idempotently and expose uncertain or quarantined states without inventing physical availability.
At scale
- For this exercise, assume 1 million members,5 million disc copies,100,000 rental allocations per day and 10 fulfillment centers. Physical shipping takes days; no instant-delivery promise is made.
- For this exercise, bound each desired-title queue at 20 entries and each member to one active rental. Copy ownership and member eligibility must be authoritative at allocation even when browse availability is stale.
- For this exercise, target 500 ms p95 for member queue/status reads and normally reflect accepted warehouse/carrier observations in status within one minute. Allocation and return acknowledgements follow durable state recording.
- For this exercise, acknowledged allocation, shipment identity and return evidence survive one worker/process failure. An unknown handoff or missing physical receipt may delay a rental; it never permits the same copy to be issued elsewhere.