Synchronization (of clocks) between two remote computers

前端 未结 9 1168
隐瞒了意图╮
隐瞒了意图╮ 2020-12-05 05:40

I\'m looking into writing a simple synchronization ability into my app and one of the concerns that has popped up is synchronization of time between two remote computers, ea

9条回答
  •  醉梦人生
    2020-12-05 06:14

    One thing we do is essentially offload all timing operations to the 'host' machine. For example, if you have 20 servers that all share a DB, use the DB's time. If you have a central server and a million client machines, then the client machines shouldn't be responsible for timing anything; do all your syncing server-side. In a truly 'distributed' environment, like a P2P network or something, use the machine that most directly 'owns' the resource in question (the actual PC the file you want to write) to syncronize/control access to the file.

提交回复
热议问题