Project Management is a Concurrency Control Problem

The target audience of this post is the database community, and especially those who take an interest in the OLTP workload. When multiple people or multiple teams are working on the same service, the same code base, even the same code path, we need project management to keep track of…

PTP/TrueTime vs. HLC when it comes to snapshots

Google's Spanner paper was published in 2012 which famously introduced the TrueTime API. PTP is the standard equivalent of TrueTime. Two years later, Kulkarni, et al. published the Hybrid Logical Clock paper – Logical Physical Clocks and Consistent Snapshots in Globally Distributed Databases. In the HLC paper, they list the downsides…

Describing State Machines using Math – TLA+ series (2)

Previous post can be found here – https://blog.the-pans.com/state-machine/. The entire series is based on Lamport's TLA+ tutorial. In the previous post, we talked about any system can be described as a state machine. What language should we use to describe state machines? TLA+ uses mathematics, which is…

Notes on the Spanner: becoming a SQL system paper

I have wanted to read the paper, Spanner: becoming a SQL system from SIGMOD 2017 for a while and finally got a chance to finish reading it. I have mixed feelings. The paper mostly focuses on the DQL aspect of SQL and only briefly mentioned DML and locking. I like…

Linearizability is more than Capturing Causality Everywhere

Linearizability is one of the strongest single-object consistency models, and implies that every operation appears to take place atomically, in some order, consistent with the real-time ordering of those operations (https://jepsen.io/consistency/models/linearizable). Quite often people make the mistake of over-simplifying linearizability as the ability of being…

IP as distributed data in the cloud

I previously wrote a post on reasoning DNS as a distributed database. In the same spirit, today, let's take a look at IP as distributed data (the Internet would be a distributed database in this analogy). This is inspired by a very interesting blog post from Cloudflare, https://blog.cloudflare.…

Bet using a token bucket

This post is a slightly expanded version of my earlier tweet. In software systems, "betting" is actually a common practice. One of the most common bets people place is retry. When the first attempt doesn't work, we can just "try it again". Retry is a bet – you are betting on…