How to think 00:00:01 A map with a thousand pins Lena is asked to find restaurants near a hungry visitor. She knows the name of a spatial index. Before she writes it down, she asks how many restaurants the map contains. Nearby needs a boundary. In this example the visitor wants open restaurants within two kilometres, ordered by distance. The service must return a short list quickly enough for someone standing on the pavement. For a thousand records, the first implementation can check each location and keep the nearest matches. Lena times it with representative requests. A service does not earn a new data structure just by containing a map. 00:00:37 Let scale change the choice The small catalogue fits in memory. A direct scan has an attractive property: somebody debugging a missing restaurant can follow exactly why each candidate passed or failed the filter. Now give the same service ten million places. A full scan examines ten thousand times as many records per query as it did with one thousand. The customer has asked the same question, but the cost changed. Lena builds a spatial index to identify a smaller candidate set. She still calculates the actual distance before returning the list. A coarse cell can include a place just outside the circle. 00:01:12 Ideas are hypotheses The next feature shows the status of a takeaway order. Somebody calls it real time. Lena asks how often the state changes and how soon the diner needs to learn about it. If people can live with changes appearing within about thirty seconds, regular polling may be adequate. Faster updates could justify a long-lived connection. The word real time by itself settles neither question. Suppose the busiest worker is at forty percent and measured demand rises to one and a half times normal. With proportional work, that suggests about sixty percent utilization. Measure again before paying for a larger fleet. 00:01:48 Split one request at its dependency A customer places an order. The list of nearby places can be recomputed. The record that somebody bought dinner has a different consequence if it disappears. Lena records the accepted order and an email task together. A separate worker delivers the message. That lets the kitchen receive the order even when an email provider is slow. The worker might send an email, lose the acknowledgement, and retry. Giving that message a stable identifier lets a cooperating recipient recognize a repeat. A queue alone cannot promise a single external delivery. 00:02:21 Give the design a way to be wrong Back at the restaurant map, imagine that the index makes candidate selection fast, but opening hours still take a second to retrieve. Would adding another spatial index make the diner’s wait disappear? Lena times the stages independently. If the expensive part is fetching hours for every candidate, batching those reads or changing what the location record contains is a better experiment. Start with a customer action you can finish. Explain what it costs. Change the assumption and trace the same action again. That habit is what lets Lena invent a design when the prompt is unfamiliar.