0

Basically the lamport clock helps the host to order the events rather than the exact time. How does all the logical clocks end up being converged in the long term?

asked Mar 19, 2017 at 11:38
1
  • 1
    What do you mean by "converge"? If you mean "all have the same value" then they won't -- at the very least, the last receiver will have a value 1 greater than its sender. Perhaps you can rewrite the question to be more clear by giving an example of a system and the communications between nodes, but as written this question doesn't make a lot of sense. Commented Mar 19, 2017 at 12:07

1 Answer 1

1

You're absolutely right about this not being about the exact time. We don't even care what the real time is. We care about keeping the clocks in sync with each other. That can be made evident this psudocode from wikipedia

The algorithm for sending a message:

time = time+1;
time_stamp = time;
send(message, time_stamp);

The algorithm for receiving a message:

(message, time_stamp) = receive();
time = max(time_stamp, time)+1;

The essential pattern here is fastest clock wins. That's not a good way to keep actual time since any clock is as likely to gaining time as losing time. But it ensures no messages are scrambled by the corrections. Since all we're trying to do is create a reliable, if partial, ordering of messages we don't care that the atomic clocks in Colorado say we're way off.

You can call this behavior "converged" if you like but I see it as all the clocks being dragged forward by one hyperactive clock because we care more about being in sync than about being correct.

answered Mar 19, 2017 at 12:41

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.