最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

分布式系统之道:Lamport 逻辑时钟

常识 admin 3浏览 0评论

分布式系统之道:Lamport 逻辑时钟

引子

@禅与计算机程序设计艺术
Lamport认为,在动手写代码之前,要先思考和写作的重要性。图灵奖得主、分布式系统先驱、LaTeX之父Leslie Lamport认为,对于程序员而言,对数学思维的强调永远不会过分,要写出好代码,不能惧怕数学。但基本上,程序员和许多计算机科学家都被数学吓坏了。
What was wrong with their original algorithm?
Well, they didn’t have an algorithm, just a bunch of code. Very few programmers think in terms of algorithms. When trying to write a concurrent system, if you just code it without having algorithms, there’s no way that your program is not going to be full of bugs.
--- Leslie Lamport,2013年图灵奖得主:如何写出数学上完美的算法

关键问题

分布式系统解决了传统单体架构的单点问题和性能容量问题,另一方面也带来了很多的问题,其中一个问题就是多节点的时间同步问题:

不同机器上的物理时钟难以同步,导致无法区分在分布式系统中多个节点的事件时序。

分布式系统之道:Lamport 逻辑时钟

引子

@禅与计算机程序设计艺术
Lamport认为,在动手写代码之前,要先思考和写作的重要性。图灵奖得主、分布式系统先驱、LaTeX之父Leslie Lamport认为,对于程序员而言,对数学思维的强调永远不会过分,要写出好代码,不能惧怕数学。但基本上,程序员和许多计算机科学家都被数学吓坏了。
What was wrong with their original algorithm?
Well, they didn’t have an algorithm, just a bunch of code. Very few programmers think in terms of algorithms. When trying to write a concurrent system, if you just code it without having algorithms, there’s no way that your program is not going to be full of bugs.
--- Leslie Lamport,2013年图灵奖得主:如何写出数学上完美的算法

关键问题

分布式系统解决了传统单体架构的单点问题和性能容量问题,另一方面也带来了很多的问题,其中一个问题就是多节点的时间同步问题:

不同机器上的物理时钟难以同步,导致无法区分在分布式系统中多个节点的事件时序。

发布评论

评论列表 (0)

  1. 暂无评论