When and How to Invalidate Cache

You can leave comments on HN – https://news.ycombinator.com/item?id=31709501. In this post, I will talk about one way to figure out when to invalidate cache entries. I will use a specific setup as an example, which should still be general enough, and at the end of…

Cache Invalidation

Cache made consistent: Meta’s cache invalidation solutionWhen it comes to cache invalidation, we believe we now have an effective solution to bridge the gap between theory and practice.Engineering at MetaLu PanWe wrote a post on Meta/FB's engineering blog on how we manage the complexities of cache invalidation,…

Feedback Loops

Any complex systems e.g. an economy seem to have feedback loops. Digital systems are no exceptions. Feedback loops add significant amount of complexity to a system, which makes it harder to manage. However, a philosophical point might be that it's exactly the presence of feedback loops that makes a…

Little's Law and Service Latency

Queueing Theory is very relevant to Computer Science as queues are all over the places – instructions to CPUs, packets to NICs or switches, requests to servers, etc. Little's Law (L=λW) is a really cool theorem because it requires very few conditions which implies its wide application. It works on…

Don't point out something wrong immediately

This is not a post on a technical topic, but rather on a common pitfall for engineers – we like to point out something wrong the moment we see it. Understandably, we are very good at it. We are basically trained for it. When it comes to code reviews, or design…

How and why the Relational Model works for databases

This is a note on, the Turing Award laureate, Ted Codd's revolutionary paper — A Relational Model of Data for Large Shared Data Banks. In this post, I will review the paper and add my comments with a perspective from modern distributed databases. Tight couplingHow users used to interact with databases…

`defaulted` constructor in C++

You have seen Foo() = default;. It declares a default constructor (duh!). But what does it really do, and when is it actually useful? "When is it useful" is a very interesting question in my opinion because next time when you see = default; in other people's code, you would understand why…

How electrical energy powers the light bulb in your house

You do not need a wire to transfer electrical energy. You do need a wire to harness electrical energy and turn it into something else (e.g. light). Derek posted a video on his Veritasium channel about the big misconception about electricity. You don't have to watch it, as I…