Build Your Own Distributed Scheduler - From Scratch

The whole build, laid out in the order its own walls forced it.
Boards
- The Map
- The Tick Loop
- Durable Job Store
- Heap and Timing Wheel
- Leader Election
- Dispatch Queue
- Idempotency and Fencing
- The Hard Part - Time
- Everything
Code: teaching/code/from-scratch/scheduler/ - one Go module, go run ./NN-stage.
Go is the programming language every stage is written in. The demos run on a
pretend clock, so every run prints the same result; the later stages show a
stand-in taking over when the one in charge dies, crashed work being handed out
again, and no job running twice.
Before you start. This series builds a small copy of a job scheduler: a program that runs other programs at the right time - a backup every night, a report every Monday - and keeps doing that correctly across several machines, any of which can die mid-job. It borrows two ideas from earlier builds in this track, and you need neither to follow along. From the small database: a file on disk that can find any one saved record quickly, used here to remember every job. From the small message log: a waiting line of work that helpers take from, where a task a helper dropped goes back in line, used here to get the jobs done.