In distributed systems, multiple nodes process events independently, making it challenging to determine the order of events. Unlike a single system where a global clock dictates event sequencing, distributed systems lack a centralized clock, which can lead to inconsistencies and conflicts.
Consider a collaborative document editing system like Google Docs, where multiple users can edit the same text simultaneously. If two users edit the same line of text at nearly the same time from different locations, how does the system decide which change happened first?
This is where Vector Clocks come in. They help track the happens-before relationship between events across distributed nodes, ensuring causality while resolving conflicts efficiently.