Counting the crowd without a register (HyperLogLog, count-min, top-k)
The Slate Next to the Stove · Open board
The slate by the stove, and its second curse: the slate is small. This lesson asks it a question it has no room to answer by writing names down. The lab at the end of the story runs the counter.
Before you start. You need the stall from The chai stall that got famous (load balancing), which got famous and became ten stalls, and the slate from The slate next to the stove (caching): a small board by the stove that holds a few lines and then runs out of room. From Hashing you need one idea: a fixed recipe that stirs any input into a jumble of digits, the same jumble every time for the same input. The second read also uses a heap from Trees (BST, balancing, heaps, tries), a pile that hands you its smallest item first.
Lesson 22 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.