Amazon Interview Question
Software Engineer / DevelopersCountry: United States
Isnt this related to the challenge with maintaining ordering of events within a distributed process? I mean defining the "happens before" relationship. Trying the sync physical clocks is not a feasible approach. That is why most distributed systems use timestamps (which are just numbers) to indicate ordering of events. Lesser number on the timestamp indicated one event happened before the other.
we can use NTP algorithm to deal with this situation.it uses a hierarchical, semi-layered system of levels of clock sources.
- Ali_BABA June 18, 2012This algorithm is a class of mutual network synchronization algorithm which allows for use-selectable policy control in the design of the time synchronization and evidence model. NTP supports single inline and meshed operating models in which a clearly defined master source of time is used ones in which no penultimate master or reference clocks are needed.
In NTP service topologies based on peering all clocks equally participate in the synchronization of the network by exchanging their timestamps using regular beacon packets. In addition NTP supports a UNICAST type time transfer which provides a higher level of security. NTP performance is tunable based on its application and environmental loading as well.