Section 2: Fast, Fresh, Safe, in Numbers - Requirements (Functional & Non-Functional)
Executive Summary: This section turns Section 1's assumptions into a contract. The functional requirements follow the four forces of a local marketplace: supply (posting and managing listings), discovery (search near me), conversation (masked messaging) and trust (reports, blocks, automated checks). The non-functional requirements are numbers: search p99 < 300 ms, publish-to-searchable p95 < 60 s, message delivery p99 < 2 s, and more nines for browsing than for posting. Privacy and consistency are stated outright. The lesson: "fast, fresh, safe" means nothing until each word has a number and a test.
The assumptions are on the board. The interviewer caps the marker: "Good. So what exactly are we promising?" Now adjectives become commitments. "Search should be fast" can't be tested; "search p99 under 300 ms at peak" can.
The Functional Contract: Four Forces
Supply: the seller (Maya)
- Post a listing: title, description, price, category, condition, location, and up to 12 photos. Maya's Trek road bike goes up with 6 photos at $450.
- Manage it: edit, drop the price, mark sold, renew, delete.
- Expiry: a listing expires after 30 days unless renewed.
Discovery: the buyer (Daniel)
- Browse by category and search near me: keyword, radius, price range, category, sorted by newest, nearest or relevance. Daniel's query is "road bike", within 10 miles (16 km), under $500.
- Listing detail: photos, description, price, status, approximate location and distance.
Conversation: both sides
- Message the other party in the app, with neither side's account phone number or email ever shown (numbers typed into chat trigger a warning, not a block, Section 9).
Trust: everyone
- Report a listing or a user. Block a user.
- Automated checks on every new listing before it goes public.
Interviewer: "Why expire listings? Sellers want them up."
Candidate: "Stale listings make the board useless. Daniel messages four sellers whose bikes sold weeks ago, gets no replies, and doesn't come back. A 30-day expiry with one-tap renew makes sellers confirm their listings are real. It also bounds the live set (at most 60 million, about 40 million in practice, since most sell early; Section 3), which sizes the search index."
Interviewer: "Why 'mark sold' when there's already a delete?"
Candidate: "Sold is a success: the listing leaves search within seconds, but the record and its conversations stay, and later feed reputation. Delete means the seller changed plans. Both pull the listing from search; only one is a transaction we want to count."
Sign in to continue reading
The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.
Sign in to read the full lesson