I’ve always been an ardent fan of physical books, refusing to read e-books as much as possible. There’s something about the feel of a non-electronic book, of how you can feel the weight and texture of a physical tome, and how the book smells, and how the pages rustle when the wind blows fiercely (San Francisco is surprisingly windy at times), that I find irresistible.

But the times are changing, and I decided to give e-books a try. This had nothing to do with Amazon adding free e-books as a Prime benefit. That was simply a coincidence.

I’ve been reading my first e-book on my iPhone for the past 10 days now. Here’s how I feel about e-books so far:

  • I miss everything I wrote in the first paragraph of this post about physical books. 
  • Having a book pretty much always with you (since I was reading this book on my phone) is excellent. I find it hard to carry a book with me unless I’m also carrying a backpack, but when the book is on your phone this is a non-issue. I’ve found myself reading much more as a result of this. Previous moments of solitary, aimless waiting have now been transformed into consumption of passages of an e-book.
  • I typically read 2-3 books at a time, and having the ability to carry all of them with me always will be great.
  • I have a (bad) habit of folding down the corners of pages of books. I do this when the page has a nice line (or lines) that I would like write down at some point. With e-books this is another non-issue — I simply highlight the lines in the app. Though this does take out the fun of going back to a page I folded and trying to figure out which line caught my attention in the first place.
  • Reading in between sets at the gym is fun. Though sometimes I lose track of time and end up with unintentionally long breaks.
  • One of the more interesting things about having physical books on display, say on a book shelf, or lying untidily in a pile by your bed, is that they are a great conversation starter. Or even a conversation killer. With e-books this facet of reading is lost.

Overall I’ve quite enjoyed my first encounter with an e-book. I don’t see it ever replacing physical books for me, but I do see it augmenting my reading experience moving forward.



“If you were stuck on an island and had to pick three songs to listen to for the rest of your life, what would you choose?”

Well. I’m glad you asked. Here’s what I would pick.

Bohemian Rhapsody by Queen: This is (in my humble opinion) the greatest song ever made. Freddie Mercury’s mesmerizing vocals, Brian May’s incredible guitar work, the changing sections and tempos — all combine to form a masterpiece. This is also my favorite karaoke song.

Stairway to Heaven by Led Zeppelin: The guitar solo is gorgeous.

Master of Puppets by Metallica: This song defines heavy metal music for me. It was the first Metallica song I ever heard and I fell in love instantly. When I started playing guitar this was the first Metallica song I tried to learn. And no, that didn’t end too well for me unfortunately.

What would you pick?



I discovered The Folio Society yesterday. I instantly fell in love with a number of their books, and I’m currently trying to decide which book(s) I want to purchase for myself. I’ve always loved books, and am starting to gain a deeper understanding and appreciation of art (SF MOMA and the de Young Museum are some of my favorite places in the city). I can’t wait to add these books to my personal library.


(domum means home in Latin)

High-Availability at Massive Scale: Building Google’s Data Infrastructure for Ads is a fantastic paper. Its primary focus is how to build distributed systems that are both highly available and strongly consistent. This is achieved by building multi-homed systems. As the paper describes them —

Such systems run hot in multiple datacenters all the time, and adaptively move load between datacenters, with the ability to handle outages of any scale completely transparently. [1]

While the paper mostly addresses building multi-homed systems in the context of distributed stream processing systems, the concepts and ideas are general enough that they can be applied to any large scale distributed software system with some modifications.

Before designing a distributed system that is resilient to failures it is paramount to understand what a failure even means in the context of software systems. Section 3 of the paper talks about common failure scenarios and highlights an important fact — partial failures are common, and “are harder to detect, diagnose, and recover from” [1] (compared to total failures). An important takeaway from this section is that when designing a new system (or trying to improve an old/current system) one should always think about what partial failures can occur, and how the system can/would react to it.

The next section motivates the need for multi-homed systems by first talking about singly-homed and failover-based systems. While singly-homed and failover-based systems are common, one typically does not run into multi-homed systems unless one operates at Google-scale (or close to). Building multi-homed systems is hard. But they offer significant benefits over singly-homed and failover-based systems in the face of (partial or total) failure. Google leverages its existing infrastructure, in particular Spanner, to build multi-homed systems with high availability.

Section 5 is the most interesting portion of the paper and talks about the challenges inherent in building multi-homed system. My main takeaway from this section is that it is virtually impossible to build a multi-homed distributed system without a system like Spanner (which is itself a multi-homed system) serving as the foundation — many of Spanner’s features, like global synchronous replication, reads at a particular version, etc. are used to solve the challenges mentioned in this section.

The paper ends with the description of three multi-homed systems at Google: F1/Spanner, Photon, and Mesa. I highly recommend reading the papers for each of these systems as well, as they have a lot more details about how these complex systems were built.

[1] http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/44686.pdf

Quotes: September Edition

I wrote a blog post talking about how I write down lines from books I’m reading. Here are some lines that I loved from the books that I read in September:

(I also just realized that both the books I read in September were about World War 2)

People aren’t supposed to look back. I’m certainly not going to do it anymore. — Slaughterhouse-Five

But sleep would not come. Tears came instead.  — Slaughterhouse-Five

“That’s one thing Earthlings might learn to do, if they tried hard enough: Ignore the awful times, and concentrate on the good ones.” — Slaughterhouse-Five

“Other people’s dreams aren’t very interesting, usually.” — Slaughterhouse-Five

The worst can always be true. — The Nightingale

Inside, the house echoed the voice of a man who wasn’t there. — The Nightingale

I belong to a generation that didn’t expect to be protected from every danger. — The Nightingale

Vianne finished the letter and immediately began reading it again. — The Nightingale

But when he looked at her — and she looked at him — they both knew that there was something worse than kissing the wrong person.
It was wanting to.
The Nightingale

“Now that you’ve met me, you’ll never be able to forget me. That’s something.” — The Nightingale

I see the surgeon in him suddenly, the man who is used to staring past blood and bone to find what is broken. — The Nightingale

How can I start at the beginning, when all I can think about is the end? — The Nightingale

“Some stories don’t have happy endings. Even love stories. Maybe especially love stories.” — The Nightingale

Goal Tracking: September Edition

At the beginning of the year I published a post outlining what some of my goals for the year were. In the spirit of being transparent, here is the progress I made on them over the course of September –

  1. 100% self availability over the course of the month.
  2. Volunteered for 0 hours  :(
  3. Little to no procrastination. Minus a tiny bit of laziness regarding buying tickets for Hawaii.
  4. Continued being honest and open over the course of September. 
  5. Made a tiny bit of progress on learning Rust. This was mostly just reading blog posts about Rust.
  6. I read 2 books in September — Slaughterhouse-Five (I read this book for the first time in 2012. And I was unimpressed. But re-reading it in 2016, with a new found appreciation and understanding of Kurt Vonnegut, made me realize how brilliant and amazing this book is) and The Nightingale (I LOVED this book! It’s beautifully written, with an engaging story, a haunting backdrop, and well developed characters. It made me cry quite a bit. This is one of my favorite books of all time).
  7. I read 1 research paper — Design patterns for container-based distributed systems. I wrote a post about it as well.
  8. I wrote 4 posts.
  9. I didn’t really play much guitar in September.
  10. (a) (goal achieved)
    (b) (goal achieved)
    (c) (goal achieved)
    (d) (goal achieved)
    (e) (goal achieved)


(This post is a summary of two papers I have recently read. Papir is the Norwegian word for paper)

Real-Time Twitter Recommendation: Online Motif Detection in Large Dynamic Graphs is a paper that was presented at VLDB 2016. It combines two of my favorite topics, distributed systems and graph theory, into a short (2 pages!) paper. It presents a simplified version of the algorithm that Twitter uses to detect motifs in real-time in a user’s social graph, which is then used to generate recommendations for the user. One thing I liked about this paper is that it presents naive solutions to the problem at hand before diving into the elegant solution that Twitter uses. The paper then presents their solution to the problem, and explains how it works at Twitter scale by graph partitioning, pruning, and offline data structure generation.

Design patterns for container-based distributed systems is a paper by Google that talks about software design patterns that are emerging from software systems that are built around containers. Software like Docker and CoreOS has made working with containers easier, and more and more companies are moving towards a container based ecosystem. Google was one of the first companies to use containers, and this paper contains design and architecture patterns that they have observed in their container based systems. The design patterns presented are grouped under three main categories of which I enjoyed reading about “Multi-node application patterns” the most. This sections deals with design patterns in distributed systems, where each node holds multiple related containers (called “pods” in the paper). It was interesting to read about how distributed system problems like leader election, scatter-gather, etc. can be dealt with language agnostic containers rather than by language specific libraries. I loved this line from the end of the paper, which made me think of containers in an entirely new light:

In all cases, containers provide many of the same benefits as objects in object-oriented systems, such as making it easy to divide implementation among multiple teams and to reuse components in new contexts. In addition, they provide some benefits unique to distributed systems, such as enabling components to be upgraded independently, to be written in a mixture of languages, and for the system a whole to degrade gracefully.