black & white

Books are wonderful.

I read a crazy amount while in school. And then for some reason this changed while in college. The only books I read were those that were required (or sometimes optional) for a class. Semi-related: I got really good at reading research papers.

I’m hoping to get back into my old reading habits. I recently (7 weeks ago) bought a book shelf for my room, after which I may or may not have gone and bought a lot of books. I read The Road, Persepolis, Persepolis II, V for Vendetta, Batman: The Killing Joke, Batman: The Dark Knight Returns, Batman Vol 1: The Court of Owls, and Batman Vol 2: The City of Owls (I also discovered that I really like graphic novels. Which makes sense since I like art. And books.). I’m currently reading Cloud Atlas. Next on the list: The Stranger, and Blindness.

I love the fact that I live close to an amazing bookstore.

It feels really good rediscovering what was once a part of my life.

On boats and consensus

I finally got done reading the Raft paper. I will be the first to admit that I’m a bit off schedule.

I was introduced to Paxos during my undergraduate studies at UIUC. Three times in fact; the first during the distributed systems class, the second during the cloud computing class, and the third during the advanced distributed systems class. Each time I had the same thought while (re)learning the algorithm: Man, this is pretty hard. It always took me a couple of times of reading the slides (for the course) or the (simplified) paper before I understood the algorithm. And I would forget it in about a month. Not the entire algorithm, but bits and pieces. Important bits and pieces unfortunately.

With Raft I’m hoping that will not be the case. It took me 2 reads of the paper to understand pretty much most of the algorithm. It has relatively few moving pieces (only 3 types RPCs!) which makes it pretty easy to understand. The paper does a great job of explaining the algorithm by first explaining how the system would function without safety constraints, and then modifying the RPCs and algorithm to deal with safety. Even with the safety constraint added the algorithm is quite intuitive. This simplicity of the algorithm leads to good performance as well: in the steady state (no crashes, and assuming the client communicates directly with the leader) the leader only has to wait for a response from a majority of followers in order to respond to a client request. My favorite part of the algorithm is leader election. Using randomized election timeouts is a simple yet effective idea.

I would recommend anyone interested in distributed systems read the Raft paper and watch this video as well.