Logical Clock
定义(中文) / Definition
逻辑时钟:在分布式系统中用于给事件“打时间戳”的一种方法,它不表示真实的物理时间,而是用来表达事件发生的先后顺序(因果关系)。最常见的是 Lamport 逻辑时钟;相关扩展还有向量时钟等。(该术语在不同语境下也可泛指“用于排序的逻辑时间机制”。)
发音(IPA) / Pronunciation
/ˈlɑːdʒɪkəl klɑːk/
例句 / Examples
A logical clock helps order events in a distributed system.
逻辑时钟有助于对分布式系统中的事件进行排序。
Even if two servers’ physical clocks drift, a logical clock can still preserve causal ordering between messages.
即使两台服务器的物理时钟发生漂移,逻辑时钟仍能在消息之间保持因果顺序。
词源(中文) / Etymology
“Logical” 表示“逻辑上的、概念上的”,强调它并非测量现实时间;“clock” 借用“时钟”的比喻,表示一个递增的计数/时间戳机制。该术语在分布式计算中广为人知,尤其与 Leslie Lamport 在 1978 年提出的事件排序思想相关,用于解决“没有全局统一时间”时如何判断先后。
相关词汇 / Related Words
文学与经典著作中的用例 / Notable Works
- Leslie Lamport, “Time, Clocks, and the Ordering of Events in a Distributed System”(1978,Communications of the ACM):提出并系统阐述逻辑时钟与事件排序(经典来源)。
- Andrew S. Tanenbaum & Maarten van Steen, 《Distributed Systems》:分布式系统教材中常用“logical clock / Lamport clock”讲解一致性与事件顺序。
- George Coulouris 等, 《Distributed Systems: Concepts and Design》:讨论逻辑时间、因果关系与事件排序。
- Martin Kleppmann, 《Designing Data-Intensive Applications》:在分布式数据与一致性语境中涉及逻辑时间、因果依赖与相关思想。