I am one of those people who function better by writing things down. One day, I realized that most of my notes don’t have to be private, so here they are - my second brain. Be warned that, if you stumble upon something here that doesn’t make sense to you, it isn’t meant to!
Logical clocks
How to reconcile logical clocks with wall clocks? Two algorithms: Lamport. Total order, consistent with causality. Vector clocks. Related but not same as version vectors. Q: how to merge two event timestamps? Q: how to compare? How to find incomparable? Timestamps summarize everything that happened before. Partial vs total order: Partial == happens before: order only between causal events, none between concurrent. Basically, some events are incomparable. Total: order defined for each pair of events. Timestamps are incremented before message sent to another node and when received.