NEW
A mechanism ordering events in distributed systems using counters.
DESCRIPTION
Lamport clocks assign monotonically increasing logical timestamps to events to reflect causal ordering. They guarantee that if one event causally precedes another, its timestamp is smaller. However, equal timestamps do not capture concurrency fully, motivating vector clocks. Lamport timestamps are foundational in distributed algorithms and replication. They are simple, low-overhead, and widely taught.
ALTERNATIVE DEFINITIONS
Wikipedia
Lamport timestamps are a type of logical clock used to determine the order of events in a distributed system.
Identifies purpose as ordering events with a logical clock.
Leslie Lamport
We show that it is possible to define a relation ‘happened before’ on the events of a distributed system and to use this relation to order the events.
Introduces the formal happened-before relation underpinning Lamport clocks.
RELATED TERMS
Happens-Before Relation Logical Clock Distributed Systems Causation Event Ordering Timestamps Concurrency State Machine Replication Partial Ordering
COMPETING TERMS
Vector Clock Physical Clock Synchronization
KNOWLEDGE AREAS
Infrastructure Software Engineering Data Storage & Operations Observability & Telemetry
TARGET AUDIENCE
Software Developer Software Architect Cloud Architect Data Engineer
EXTERNAL SOURCES
- Wikipedia - Lamport timestamps
- Leslie Lamport - Original logical clocks paper
- MIT 6.824 - Course notes covering Lamport clocks
TOP QUESTIONS
What problem do Lamport Clocks solve?
They provide a logical ordering of events in distributed systems without requiring synchronized physical clocks.
Category: Concept
How do Lamport Clocks differ from Vector Clocks?
Lamport clocks capture ordering but not concurrency; vector clocks also detect concurrent events with per-process counters.
Category: Comparison
Where are Lamport Clocks used?
They appear in replication protocols, distributed mutual exclusion, and event ordering for logs.
Category: Application
What are common mistakes with Lamport Clocks?
Assuming they detect concurrency or equate timestamps across processes leads to incorrect causal inferences.
Category: Mistakes
Do Lamport Clocks require synchronized physical time?
No, they rely solely on logical counters incremented on events and message passing.
Category: Misunderstanding
How to test Lamport Clock implementations?
Validate monotonicity and happened-before preservation under varied message delays and reordering.
Category: Testing
Are Lamport Clocks still relevant?
Yes, they remain fundamental in teaching and as building blocks for more advanced clocks.
Category: Relevancy
What is a hot topic around logical clocks?
Hybrid logical clocks combining physical and logical time for efficient causality tracking.
Category: Topic
How do Lamport Clocks interact with consensus?
They can help order events, but consensus still requires agreement and fault tolerance beyond logical timestamps.
Category: Concept