Raft 01: Leader Election

The System Design episode on who is allowed to write and what the picking cannot protect. This lesson builds the picking. Part of the Raft series, Build Your Own Raft.
Before you start. This series builds a small copy of Raft, the algorithm a group of machines uses to keep one shared list of commands. This first stage builds only the part that decides which machine is in charge. You need Build Your Own Raft for the map and for what the simulated world looks like (five nodes, a queue for a network, a clock that moves one tick at a time). The idea of one machine holding the pen comes from Who holds the pen (consensus & Raft).
