The System Design board about how two services meet. They never see inside each other. They meet at a counter, across a written list of what you may ask for and what comes back, and this lesson is about writing that list so strangers can still use it in three years. There is a video of this board: the contract at the counter.
Before you start. You need two facts: that programs talk to each other over a network, and that a network sometimes loses the message, so the sender is left not knowing whether it arrived (How a parcel finds any house on earth has the packets underneath, if you want them). The rest of the story is an auction site, a court order and a menu.
Lesson 23 of 115 in System Design
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.
Or start free: a free account opens lessons 2 and 3 of every track.
In this lesson
1999: a company that read somebody else’s web pages for a living
20 November 2000: eBay writes the promise down, and it is an API
11 June 2013: the day the old menu stopped being honoured
Adding to the menu is free, taking something off never is
Since 2011: print a new version, keep honouring the old one
The order number on the slip: an idempotency key
Page 45,000, and the marker that says “after the last one I saw”
Twenty trips to the counter for one tray
“Come back in thirty seconds” is not “we don’t sell that”
Terms it explains: API, breaking change, version, idempotency key, cursor, client, field, REST, over-fetching, under-fetching, Use it for, gRPC, Protobuf, GraphQL, 429 Too Many Requests, 408 Request Timeout, POST is not, 401 Unauthorized, 403 Forbidden.