A Humbling Raft(ing) Trip

Photo by Any Holmes — Unsplash

Yesterday was the last day of David Beazley’s week-long training Rafting Trip. The aim of the course is to learn, understand, discuss and implement the Raft distributed consensus algorithm. Raft is at the heart of etcd, which is arguably one of the most important pillars and underpinnings of Cloud Native and distributed computing.

The first and hardest question is: “where do I begin?” The reason this is a hard question with many correct answers is that there is a plethora of implicit complexity and decisions to be made that will absolutely affect the outcome of the endeavor. Do you start from bottom up (i.e. networking abstraction)? And if so, how deep do you go (socket programming)? Or do you start from the API level and work the curveballs as they come? Or do you start with the state machine? Or the log replication?

The second hardest question is how will you verify and test it? How do you make all pieces observable? This question actually turns out to be one that will drive many of your decisions, make changes to the current solution and a ultimately will be a driving force in discovering the near-unimaginable number of corner cases that hide underneath the surface — that need to be addressed for the algorithm to work.

Perhaps you decide to learn more about the algorithm and the plethora of edge cases for each of the components and somehow rank them and make a decision based whether you want to tackle the easiest or hardest. This could work, in principle. The problem, as I’ve alluded to earlier, is that there are a non-trivial amount of corner cases that will make you regret a lot of earlier decisions.

Maybe you decide to go BDUF and take the time to flesh out every single possible state of every component, interactions, data flow, sequence diagrams and the whole shebang. But this would probably take you days if not weeks worth of work to complete and pray to Turing almighty you got it completely right.

This week was humbling and constructive in many ways. Implementing Raft is such a beast that it will quickly reveal your weaknesses and it will endlessly challenge your strengths as a software designer, architect and engineer. This course blew all my expectations away and in no small reason because David is such a wonderful, knowledgeable, curious and entertaining instructor. If you want a non-commercial training, one that you will feel enriched by and leave you absolutely mentally exhausted, I could not recommend Rafting Trip enough.

--

--

Software, hi-fi audio, data, financial markets observer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store