Distributed Foundations: Time & Ordering
Implementation-first module for reconstructing causality in distributed incidents.
1 / 15
Implementation-first module for reconstructing causality in distributed incidents.
== +1).<=).Rules:
clock++clock = max(clock, msg) + 1Guarantee:
A -> B implies L(A) < L(B)+1 after max.Classify a vs b as:
equalbeforeafterconcurrentPack rule:
0Track booleans while scanning:
aLEbaGEbMap booleans:
aLEb -> beforeaGEb -> afterState (H, L):
H: physical componentL: logical tie-breakerLocal/send:
Now > H -> (Now,0)(H,L+1)Compute H' = max(H, Hr, Now) first.
Then:
H'==H==Hr -> max(L,Lr)+1H'==H -> L+1H'==Hr -> Lr+1H'==Now -> 0Deliverable iff:
msg[s] == local[s] + 1i != s: msg[i] <= local[i]Interpretation:
Messages arrive out of order.
Algorithm:
>= instead of ==)Cut is consistent iff for all i,j:
clocks[i][j] <= cuts[j]0Why:
lamport-clockvector-clock-comparehlc-timestampscausal-delivery-checkcausal-broadcast-deliveryconsistent-cut-checkEach step reuses invariants from earlier ones.