Synctime

  1. SYNCHRONIZING PHYSICAL TIME: central server
  2. time server and distributed to nodes. Latency between transfer could be a problem.
    • 估计来回的时间
    • 注意不要回到过去
    • 可以miss tick放慢时间
  3. 没有一个标准时间的话,就设立一个master询问每个client时间,average.调整时间是原来的两倍。
  4. BERKELEY ALGORITHM: server向所有人请求时间,算入RTT,average,返回client,注意drift可能是原来的两倍。
  5. logical time: 保证顺序。高时间不可能导致低时间的任务发生。
  6. LAMPORT LOGICAL TIME: happened before
    • The counter is incremented before each event.
    • The message should carry the new (incremented) timestamp.
    • 维护全局index,不能处理接受和发送的问题
    • If two events have no message exchange, Lamport logical time cannot tell which one happened first
    • 可能出现无法处理因果的情况
  7. google truetime: compares itself with others, twice drift
  8. Cristian's Algorithm is one approach to synchronizing physical clocks using a time server.