
Ever wondered why you can't always get the latest news instantly?
Image: Los Alamos National Laboratory, Attribution, via Wikimedia Commons
Ever wondered why you can't always get the latest news instantly?
Imagine you're trying to watch a live sports game online, but sometimes the video lags or freezes even though your internet is working fine.
The internet is like a sports game broadcast. Sometimes, to keep the video smooth (consistency), you might miss a few seconds (delay), or you might get a video that looks outdated (old data). But if you want to keep watching without interruptions (availability), you have to accept that you might not always see the latest play (old data).
Example
You stream the game, and at one point, you see a replay instead of the live action because the server took a moment to update.
Remember this
The CAP theorem explains why you can't always have the latest news (consistency) and uninterrupted service (availability) at the same time.
Text adapted from Wikipedia, licensed under CC BY-SA 4.0.
eventual consistency means: all replicas converge to the same state given enough time
Ever wonder why your favorite online store always shows you the same price for a product, even if you see different prices elsewhere?
ACID
ACID guarantees data validity in transactions
consistent hashing solves: minimizes key redistribution when servers are added/removed
Consistent hashing minimizes key redistribution when servers are added/removed
the optional stopping theorem says about martingales and stopping times
Martingale: E[X_{n+1} | X_1, X_2, ..., X_n] = X_n
Shannon's source coding theorem: you can't compress below entropy
Can you squeeze endless text into fewer bits without losing anything?
Outline of databases
Ever wonder how your online bank keeps your money safe during transactions?
Swipe through 100 ML concepts daily
Open Pocket Polymath