Just in the last year, Facebook has tried to get involved with your love life and with your digital finances. It should come as a surprise to no one that the social media platform is now looking into meddling with our time-keeping, too.
Researchers from Facebook's engineering team have just released a public time-keeping service dubbed time.facebook.com, a twist on similar tools already made available by competitors such as time.google.com and time.apple.com. All three services exist to answer the same question: what time is it now? And Facebook has reason to believe that its brand-new service is the most precise of them all.
It is, in fact, impossible to know exactly what time it is at the most fundamental level, because by the time you've asked, it's already not the time you inquired about anymore. Toss in the complex web of technologies currently necessary to relay the information held by the servers that bring Universal Coordinated Time (UTC) to your devices, and you can be sure that you are, indeed, always running a bit late, although not necessarily by any fault of yours.
In reality, most of our clocks synchronize to UTC over a protocol called the Network Time Protocol (NTP), which typically only lags a few milliseconds behind. Except milliseconds add up, and after a month you end up with a microwave that's an hour behind, Oleg Obleukhov, production engineer at Facebook, and who developed the new time-keeping tool, told ZDNet.
"For your microwave, really, it doesn't matter that much," he said. "But time precision, on a day-to-day basis, is extremely important for other services. A one-second difference doesn't make much of a difference for a human, but imagine all the transactions that can happen in a data center in the same amount of time."
And so, unsatisfied with the services already available, Facebook went out and "fixed time" on its own. The new tool uses a different technology to improve precision in time-keeping, according to the company, from tens of milliseconds to hundreds of microseconds.
Facebook's team kicked off the project by trying to assess exactly how precise existing time-keeping technologies are. The precision clocks that satellites have on board, and which essentially define what a second is, are currently relayed by NTP devices that receive the signal and keep satellite time at their own level via ultra-precise atomic clocks. These atomic clocks then deliver time to servers and devices, typically through a computer program called ntpd.
Ntpd's role consists of synchronizing our clocks to UTC by compensating for the inevitable latencies in the process, based on mathematical formulas that account for things like congestion. "If you say: 'give me the time now', you will always get time that is outdated, even in its lowest latency," explained Obleukhov. "Ntpd fixes the inaccuracies in the network."
An open-source product, ntpd is used for most time-keeping services and is probably responsible for setting the time in your computer right now. But Obleukhov's team, after carrying out various high-precision tests, found out that the system is not as accurate as commonly believed.
"We decided to find out how wrong time really is," said Obleukhov. "Because ntpd can say that it is ultra-precise, but people have no way to actually know. And our measurements showed that actually, although ntpd is the most popular system, it is not precise enough."
The researcher's team found that the program's error margin was up to ten times bigger than thought, with a lag of about two milliseconds instead of 0.185 milliseconds.
The good news is ntpd is not the only system out there. Another open-source tool to measure time, which is gaining traction, is chrony – a program "completely independent from Facebook", said Obleukhov.
Facebook's engineers used various testing methods, including oscilloscope measurements and pulse-per-second technology, and established that chrony's results are between ten and 100 times more precise than ntpd's. In other words, instead of milliseconds, chrony's lag can be counted in microseconds.
The whole of the social media giant's services and activities have now internally switched from ntpd time to chrony time. But one concern still stood out. "We used a service without knowing exactly who managed it, and whether it would still be available tomorrow," said Obleukhov. "So we decided to create our own."
And while at it, why not make it a public service? Thus, time.facebook.com was born – an end-point that anyone can use to synchronize their device to. According to Facebook, the new chrony-powered tool fares better than similar services offered by Google and Apple, albeit only at times. "We can see that not only is our public NTP endpoint competitive with other popular providers," read Obleukhov's paper, "but in some cases, it also outperforms them."
At first glance, the interest of having a clock that is more precise by microseconds rather than milliseconds might not come across as obvious. Fairly so: Obleukhov himself acknowledged that the immediate effect for consumers "won't be life-changing". Rather, the bulk of the perks will be felt in specialized environments, like databases, where transactions are time-stamped and mix-ups can be hard to avoid if time isn't kept as precisely as it can be.
Facebook's team also mentioned the relevance of the tool for video codecs, which depend on time to ensure higher quality during a video conference call. And of course – one can only imagine that mastering time, as a concept, can only sit well with the ambitions of a Silicon Valley tech company.