An Online Auction System is a digital platform that facilitates the buying and selling of items through competitive bidding, typically over a fixed time window. Sellers can list products for auction, and buyers can place incremental bids to compete for ownership.
At the end of the auction period, the highest bidder wins, and the system finalizes the transaction. Examples of such platforms include eBay, Sotheby’s, and GovDeals.
In this chapter, we will explore the low-level design of an online auction system in detail.
Let's start by clarifying the requirements:
Before starting the design, it's important to ask thoughtful questions to uncover hidden assumptions, clarify ambiguities, and define the system's scope more precisely.
Here is an example of how a conversation between the candidate and the interviewer might unfold:
Candidate: Can a user place bids on multiple items simultaneously?
Interviewer: Yes, users should be able to participate in multiple ongoing auctions at the same time.
Candidate: How is the winner of an auction determined? Is it simply the highest bid at the end time?
Interviewer: Correct. The user with the highest bid when the auction ends wins the item. In case of a tie, the earliest bid should be considered the winner.
Candidate: Should users receive notifications when they’re outbid or when an auction they’re involved in ends?
Interviewer: Yes, users should be notified when they’re outbid, and when an auction they’re participating in ends.
Candidate: Should we keep a record of all bids for an item?
Interviewer: Yes, the system should maintain a complete bid history for each auction item.
Candidate: Do we need to implement payment processing and delivery logistics?
Interviewer: No, assume payment and delivery are handled externally. Our system only needs to manage the auction and declare the winner.
After gathering the details, we can summarize the key system requirements.