By the last page, this is the design you will have built. Drag it, or Show all, to see every part.
Lesson · 12 pages · about 10 min
Design a stock exchange
Matching orders fairly at the opening bell: an order book per stock that a lock limits to one line, a sequenced log with an in-memory matching engine per stock, and risk checks before the line.