Course Dates:
Course Hours:
Cost:
Instructor: David Beazley
This course was offered as part of the Summer of Rust. That has come and gone, but if you still want to give the Raft project a try, sign up for the regular Rafting Trip course. You can still implement it in Rust--it's just that others might think that you're a little crazy.
In 1914, the Endurance set sail on a voyage that carried Sir Ernest Shackleton and his men to Antarctica. One of the strongest wooden ships ever constructed, the Endurance finally succumbed to ice and sank to the bottom of the sea on November 21, 1915. Stranded on the ice for months, Shackleton eventually led his men to the remote Elephant Island. From there, he and five other members of his crew made an 800-mile open sea journey in a lifeboat to South Georgia to organize a rescue. To be honest, I'm not sure the boat was all that rusty.
Nevertheless, I only mention this story because it kind of reminds of rafting. And rafting makes me think of the Raft distributed consensus algorithm. An algorithm apparently named in honor of a vessel that you could use to escape the island of Paxos. Yeah, THAT island.
In any event, the problem of distributed consensus relates to the challenge of making a group of machines operate as a collective whole that can survive the failure of one or more of its members. This behavior is a critical part of building reliable fault-tolerant systems. Raft is an algorithm that achieves just that. Rust is a programming language that will try to stop you.
Our goal is a modest one--implement Raft from scratch in Rust using nothing more than basic system programming libraries and your wits. It will not be an easy task. It may be the hardest small bit of systems code you'll ever have to write, "test", and debug. However, you will learn a lot in the process and at the end of the week, you might be ready to be committed. Are you up to the challenge?
Programmers now live in a world of distributed systems. Tackling a fundamental "hard" problem of distributed systems will make you a better programmer and a better problem solver. Attempting to code this in Rust will additionally make you fearsome.
This course is for experienced programmers who want to deepen their knowledge of operating systems, concurrency, networks, and distributed systems. There are also strong elements of design, software architecture, and testing of complex systems.
This is a project-based course that involves a significant amount of thinking, discussion, and planning. Each day starts with a short group discussion and coding related to different facets of the project. However, 5-6 hours a day is spent working on the project.
Implementing Raft is typically a multi-week project found in a graduate computer science course on Distributed Systems. You should be generally familar with topics that might be covered in an operating systems course such as processes, threads, locking, etc. All code examples and projects are coded in Rust. You should already be familiar with Rust programming basics.
Although the stated goal is to produce a working implementation of the Raft algorithm, the ultimate purpose of the course is cover important topics from concurrency and distributed computing in a practical setting. Topics will include:
A major challenge in completing the project is managing the complexity of testing, monitoring, and debugging in the presence of failures and nondeterministic execution. In a basic 5-machine configuration of Raft, you might have code executing with upwards of 60 threads, spread across multiple processes, interacting with various timers and queues. This will push the limits of your ability to comprehend what is happening. Much of the course is spent on coping strategies.
Yes. Are you?
This course is taught by David Beazley. David is probably best known in the Python world as the author of Python Distilled (Addison Wesley) and the Python Cookbook, 3rd Edition (O'Reilly Media). You might be wondering what would qualify him to teach a Rust course, but David is also a former University Professor, having formerly taught Operating Systems, Compilers, and Networks at the University of Chicago. In 2023 and 2024, he taught Programming Languages with Shriram Krishnamurthi at Brown University. He's seen some things.
Copyright (C) 2005-2026, David Beazley