API for Assigning Timestamp

This is a follow-up post of my previous one [https://blog.the-pans.com/notes-on-the-spanner/] about Spanner. There I talked about how Spanner uses TrueTime API to achieve external consistency at global scale and hide sharding and replication from users. In this post, I want to discuss different options of assigning…

Notes on the Google Spanner Paper

This is my notes on the paper: Spanner: Google’s Globally-Distributed Database [https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=2ahUKEwiM8NSx3p_pAhUOpp4KHRwAAoUQFjADegQIBBAB&url=https%3A%2F%2Fresearch.google.com%2Farchive%2Fspanner-osdi2012.pdf&usg=AOvVaw0jTMltcXSUju43NRB29vPi] . I will first…

Understanding Paxos as a Read-modify-write Transaction

Paxos in one hand is very concise. It fits in a single slide. Paxos algorithm (https://blog.the-pans.com/paxos-explained/)On the other hand, Paxos is notoriously hard to apprehend. In this post, I will explain Paxos as a read-modify-write transaction, which is much more intuitive in my opinion. TL;…

Notes on the Amazon Aurora Paper

This is my notes on the paper: Amazon Aurora: Design Considerations for High Throughput Cloud-Native Relational Databases [https://www.allthingsdistributed.com/files/p1041-verbitski.pdf]. What's Amazon Aurora Functionally speaking, an instance of Aurora is same as an instance of MySQL. The differences are Aurora decouples compute from storage and it's…

Non-blocking 2pc

2pc is a Blocking Protocol Two Phase Commit is a blocking protocol. It blocks when Coordinator is not available. Not only the transaction cannot make progress. Other transactions that conflict with the same set of keys are also blocked. Non-blocking 2pc Alternative Daniel Abadi proposed a non-blocking alternative for 2pc…

Consistent Badge Count at Scale

-- Scalable Read Atomic Transaction for Partitioned Datastore A Story You are building a messaging app. You start with a non-partitioned single database, where you store unseen message count and the actual messages in two different tables. It served you well ... until more and more people are using your app…

Paxos at its heart is very simple

The Paxos algorithm, when presented in plain English, is very simple. -- Leslie Lamport 2001 [1] I am going to try explain the single decree Paxos in a way, hopefully, that's easy to understand. To this day, IMO, John Ousterhout's lecture on Paxos is still THE BEST out there. The…

Paxos Replication vs. Leader-Follower Replication

If you are operating some stateful services, chances are you have to replicate your data. There are use cases of single replica database, in which cases, the user can tolerate dataloss. It's optimizing for throughput, low latency, etc. But vast majority of stateful services have to deal with replication. Replication…