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 Pan [https://engineering.fb.com/2022/06/08/core-data/cache-invalidation/]We wrote a post on Meta/FB's engineering…

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 [https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjv9YXhpbf1AhW_kIkEHazED9cQFnoECAYQAQ&url=https%3A%2F%2Fwww.…

`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 [https://www.youtube.com/watch?v=bHIhgxav9LY&t=…

C++ exception (3) – catching an exception

This is the third post of a series that I am making on C++ exceptions. C++ exception (1) — zero-cost exception handlingThis is the first post of a series I am making on C++ exceptions. C++ exception (1) — zero-cost exception handlingThis is the first post of a series I am making…