Vector Clocks
Explore how vector clocks provide a precise method for capturing causality and concurrency in distributed systems. Understand their structure, protocol rules, and how they overcome limitations of Lamport clocks. This lesson helps you detect causal relationships and concurrent events efficiently using vector clocks.
Limitation of Lamport clocks
The main limitation of Lamport clocks is that they do not satisfy the strong clock condition. This means they cannot be used to infer causal relationships between events.
The underlying reason for this is that both the local and the global logical clocks for each node are flattened into a single number, which does not provide all the necessary information to track causal relationships.
So we need to maintain a set of all events that causally precede each event. This is known as a
Defining vector clock
A vector clock is another type of logical clock, where the clock data structure for each node is a vector of counters , where is the number of nodes in the system. For the clock of the node :
- The