Giter VIP home page Giter VIP logo

Comments (4)

Morriaty-The-Murderer avatar Morriaty-The-Murderer commented on May 30, 2024

lamport timestamp 第二步不是很理解,「P2 先接收到了此事件,本地更新逻辑时间戳,这个事件在 P2 中为m1@(2,P2)。」,为啥p2的time一定是2

from bmpi.dev.

madawei2699 avatar madawei2699 commented on May 30, 2024

lamport timestamp 第二步不是很理解,「P2 先接收到了此事件,本地更新逻辑时间戳,这个事件在 P2 中为m1@(2,P2)。」,为啥p2的time一定是2

因为P2中并没有m1的版本,当它接受到P1发送的m1后会自动加1,这样时间戳就变成2了。你看算法中就是选择本地或接受事件中更大的值,在这个例子就是1,然后再给它自增1,变成2了。

from bmpi.dev.

Morriaty-The-Murderer avatar Morriaty-The-Murderer commented on May 30, 2024

@madawei2699 明白了,一开始我理解成 m1 、m2 、... 、mn 共享一个 P2_local_time 了

from bmpi.dev.

madawei2699 avatar madawei2699 commented on May 30, 2024

@madawei2699 明白了,一开始我理解成 m1 、m2 、... 、mn 共享一个 P2_local_time 了

可以把本地时间戳理解为数据的版本号,每个数据(变量)都有自己的版本号

from bmpi.dev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.