AlgoViz

Design an inventory management system

medium 80 min

Count goods in several places, promise them to orders without ever promising too much, ship or let go, and explain every count.

Watch lesson4:28

Deep dives

Compare the options before you open them, then say which you would pick.

Dig

Where they go next, and your first sentence

They askFirst sentence
Two orders, last jar?Check and hold are one step under one lock.
Is one lock enough?At 50 orders a second it is busy a tenth of a percent.
Deadlock?Locks are taken sorted by product.
Customer leaves?The promise has an end; ship checks the clock itself.
Request repeated?The order id is the key; same content returns the first promise.
Count is wrong?I add a movement with a reason and break promises by a rule.
Goods with dates?The line gets batches, sorted by best-before.
Moving goods?The road is a place.
Two processes?The check goes into the WHERE of the update.

From question to page

Say which kind of question it is before you answer. It buys ten seconds and shows order.