`folly::IOBuf` and zero-copy networking

I see folly::IOBuf often used as a return value (sub-)type in RPC definitions for data intensive and high performance applications. I looked at the code, and it says Well if it's used primarily for networking code, why do applications use it? I don't think people use sk_buff…

What I learned about `inline` recently

C++'s inline is pretty nice, in my opinion. I define an inline function with external linkage, things work as expected (https://en.cppreference.com/w/cpp/language/inline): * taking the address of the inline function works * function-local static objects work as expected (shared across all translation units) * no ODR…

`ssh` to my workstation over Internet

I have eero at home with eero plus subscription as I like the parental controls. To my delight, the subscription also comes with DDNS. I wanted to set it up so I can ssh to my workstation from a laptop from our town library or a coffee shop. 1. Enabled…

What Good Are Impossibility Results

Here is the section 3.5 of Nancy Lynch's 1989 paper – A Hundred Impossibility Proofs for Distributed Computing, which is profound: What good are impossibility results, anyway? They don't seem very useful at first, since they don't allow computers to do anything they couldn't previously. Most obviously, impossibility results tell…

Caching Partially Materialized Views Consistently

Cache and Materialized View According to the PostgreSQL wiki, A materialized view is a table that actually contains rows, but behaves like a view. That is, the data in the table changes when the data in the underlying tables changes. According to Wikipedia, ... a materialized view is a database object…

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…