Working with time in Google


Precision PRS10 rubidium oscillator

Google has decided to abandon the use of NTP (Network Time Protocol) and created his own system of check of time with GPS and an atomic clock, more accurate and reliable. It was called TrueTime API. The system works to ensure the integrity of the world's largest database Google Spanner distributed around the world.

In mid-September 2012, Google unveiled the information on their unique database which globally distributed data-centers of Google on different continents — and thus ensures the integrity and synchronization of data. Experts believe that nothing like no other company of those who work with large amounts of data, including Facebook.

As you can see from the published in September scientific work, a key innovation in Google Spanner is to ensure the integrity of data by a new system of encoding information about the time of the transaction. Google engineers have developed a multilevel system of verification of time records of time intervals of transaction and evaluation the trust level labels of the time. This is a key factor that affects the reliability of the system.

Usually the data centers and web services rely on Network Time Protocol (NTP) — online services that provide information with atomic clocks, but due to network lag, such methods do not ensure accuracy, which is suitable for large-scale data center. And sometimes the NTP at all serious crashes, as happened recently, after adding leap seconds.

In General, Google has decided to abandon the NTP and establish their own control system, more accurate and reliable. It was called TrueTime API.

Instead of receiving data from an external clock, Google has equipped the data centers of their own atomic clocks and GPS receivers. This equipment is connected to certain servers that distribute time stamps other servers in the data center. In fact, on each machine in the data center running in the background daemon that constantly polls the time server in your data center and similar time servers in other data centers. Thus, the Google servers around the world guaranteed to run on the same time.



Google TrueTime API is provided to synchronize data, where different data centers are trying to simultaneously write to the same cell in the database. Interface TrueTime API returns the value of the time interval TTinterval: this time, with the inherent measurement error and uncertainty. If the intervals TTinterval two competitive transactions do not overlap, then it is safe to say which one happened earlier. If they intersect, this means some degree of uncertainty.

Google had to install GPS antennas on the roofs of their data centers and the atomic clock inside of server racks in data centers. The cost of even a very good atomic clocks are relatively small in comparison with the cost of servers in each rack.


Atomic clock for a short period of time work is more reliable than GPS, but on a long period of time they need to be tied to the GPS.

[Source]
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

The release of the new version of the module modLivestreet 0.3.0-rc

mSearch: search + filter for MODX Revolution

Emulator data from GNSS receiver NMEA