The simulation demonstrates how each node's Hybrid Logical Clock updates on local events and on receiving messages, showing the physical time component staying close to real wall-clock time while the logical counter increments only when needed to preserve causal ordering between events across nodes with independently drifting clocks.
Add nodes with independently drifting physical clocks, trigger local events on any node to see its HLC advance, and send messages between nodes to watch the receiving node's HLC merge the maximum of its own prior timestamp, the incoming timestamp, and its current physical clock, with the logical counter incrementing exactly when physical time alone cannot resolve the order. Compare the resulting HLC pairs to confirm that causally related events always end up correctly ordered.
Controls let you add or remove nodes, adjust each node's simulated clock drift, trigger a local event on a chosen node, send a message from one node to another, and step through time to observe how each node's physical time and logical counter components evolve and merge.
In most production traffic patterns, the logical counter portion of an HLC timestamp stays at zero or a very small number almost all the time, since it only needs to increment during bursts of causally related events that land within the same physical clock tick, which is why HLC timestamps look and behave almost exactly like ordinary timestamps in everyday use.
The simulation demonstrates how each node's Hybrid Logical Clock updates on local events and on receiving messages, showing the physical time component staying close to real wall-clock time while the logical counter increments only when needed to preserve causal ordering between events across nodes with independently drifting clocks.
The simulation demonstrates how each node's Hybrid Logical Clock updates on local events and on receiving messages, showing the physical time component staying close to real wall-clock time while the logical counter increments only when needed to preserve causal ordering between events across nodes with independently drifting clocks.
Add nodes with independently drifting physical clocks, trigger local events on any node to see its HLC advance, and send messages between nodes to watch the receiving node's HLC merge the maximum of its own prior timestamp, the incoming timestamp, and its current physical clock, with the logical counter incrementing exactly when physical time alone cannot resolve the order. Compare the resulting HLC pairs to confirm that causally related events always end up correctly ordered.
In most production traffic patterns, the logical counter portion of an HLC timestamp stays at zero or a very small number almost all the time, since it only needs to increment during bursts of causally related events that land within the same physical clock tick, which is why HLC timestamps look and behave almost exactly like ordinary timestamps in everyday use.