Live data from Hacker News

Open-sourcing a more precise time appliance

engineering.fb.com

131–140 of 188 posts

Re: Open-sourcing a more precise time appliance

#132

Earlier quoted context omitted.

To improve the performance of their distributed systems by imposing stronger assumptions than full asynchronicity on their environment, I expect. (See also Google’s Spanner.)

Of course we go inspired by the Google Spanner project and what they have published over a decade ago. Hats off to the Google Spanner team

Sure, I didn’t intend to make any deep point here; I don’t think I have any deep points to make in this particular area, honestly :) I just wanted to drop a set of easily searchable terms for motivation that might not have been made explicit in your writeup (probably because it’s quite tangential to it—metrology and distributed systems are both fascinating but don’t really share a lot of ideas).

Re: Open-sourcing a more precise time appliance

#133
post #27

Earlier quoted context omitted.

Cockroach is much less dependent on highly accurate clocks. That was basically the core goal. Spanner like, without expensive clock infrastructure. Though it sounds like CockroachDB does better with at least reasonably well synced clocks. https://www.cockroachlabs.com/blog/living-without-atomic-clo...

True, I'm not disagreeing with you. However, it's worth nothing that Cockroach DB's consistency model assumes consensus in 180ms, and Spanner assumes similar SLOs at 6ms. Arguably, one could say that the reason why an open-source spanner-like DB doesn't exist in the marketplace with comparable performance is because these types of cards are proprietary and close-source (i.e Google's TrueTime). To your point, Cockroac…

Would be nice. Though it still requires an antenna that can see the sky, and the cabling.

Re: Open-sourcing a more precise time appliance

#134

I cannot find any source files for the FPGA code in the repository (no .v .vhd .vhdl files and I can't see anything by looking around manually). The FPGA directory [1] contains some binaries and some documents relating to commercial code from a Swiss firm [2]. I've seen plenty of projects described as open source when the firmware is open source and the hardware is closed but this is the first time I've seen one wher…

I would bet it's just a simple oversight. It happens. Did you file an issue so they're aware of the problem?

Thank you, I will put a query on Github.

However, I think they've used code from NetTimeLogic under a licence [1][2] that precludes distributing the source:

> 3.2 Distribution Rights. LICENSEE may reproduce and distribute the Licensed Materials, solely in binary form that operates in LICENSEE’s system-level hardware products.

This is a perfectly reasonable way of developing a system but it is sadly incompatible with sharing your work as open source.

[1] https://www.nettimelogic.com/licensing.php

Edit [2] IANAL, this is not legal advice etc.

Re: Open-sourcing a more precise time appliance

#135
post #11
post #5

Earlier quoted context omitted.

From the article: "More accurate time keeping enables more advanced infrastructure management across our data centers, as well as faster performance of distributed databases."

That seems rather ambiguous and doesn't really explain why having more time precision results in faster performance or 'advanced infrastructure management'. I can understand why a stock broker or trading firm requires PTP to enable precise date-stamps for auditing/validating trades. I don't see how having a time granularity on the order of picoseconds is needed for a data center.

PTP is required in a number of 5G implementations. Facebook's 5G core (Magma - https://github.com/magma/magma) utilizes it quite a bit.

Re: Open-sourcing a more precise time appliance

#136
If you want the go under the nanosecond there is the White Rabbit [1][2] project. The CERN uses it to control the magnets in the loop of a particule accelator. It is also based on NTP, Ethernet and FPGA.

[1]: http://www.ohwr.org/projects/white-rabbit

[2]: https://en.wikipedia.org/wiki/White_Rabbit_Project

Re: Open-sourcing a more precise time appliance

#138

Earlier quoted context omitted.

Yeah, I think you're on the right track. I like less and less having a Linux box to maintain, and there is less control over the timing of internal operations compared to a microcontroller, of course. On the other hand, Chrony is really, really good, and it would be a lot of code and debugging to write something that good from scratch. With the Beaglebone, it's theoretically possible to drive the oscillator from a ca…

That's a useful feature of the BeagleBone. When I originally built my clock with a Raspberry Pi I used a GPS with a PPS line and hooked that into one of the Pi's GPIO lines. I could get the Pi's clock synced to the GPS very accurately (easily sub-ms) with that (using chrony), but the problem became then updating the display (similar to your setup, a 7-segment MAX7219-driven display). I started looking into writing a…

I measured how long it took on average to write out the display, and I set my program to write out the display at that time. The values are in the source code in that repo, but if it was 1ms, at 23:59:59.999, I'd wake up and write out 00:00:00. (Scheduling jitter could be a problem, but comparing when my program starts writing data to the actual PPS signal with an oscilloscope, it seemed amazingly consistent to me. I don't have my data around to really confirm that, though.)

I have that video linked to Github and within about ~10ms, you can tell that things are working really well when the audio and visuals line up. (I say ~10ms, because there is a 2ms propagation delay between the radio station I'm receiving and the clock display changing, and it looks perfect to the eye. If it's a little longer than that, you'll notice -- WWV with ~8ms propagation delay makes you question whether or not the display is updating correctly. It is hard to discern 8ms, of course, but I think it's noticeable if you're looking for it. This, BTW, is why I hate 60Hz monitors. Your brain definitely notices the 16ms it takes from pressing a key to it showing up on the screen. We get used to it, but why tolerate failure when you can make it perfect?)

Re: Open-sourcing a more precise time appliance

#139

Earlier quoted context omitted.

I believe they usually get it from the network.

That was my impression as well but now I’m puzzled about why. Since most smartphones have GPS builtin why not get time from GPS?

Mobile basebands already get the local time and UTC offset when connecting to a tower, there's no need to power up the GPS antenna and receiver separately.

Re: Open-sourcing a more precise time appliance

#140

I cannot find any source files for the FPGA code in the repository (no .v .vhd .vhdl files and I can't see anything by looking around manually). The FPGA directory [1] contains some binaries and some documents relating to commercial code from a Swiss firm [2]. I've seen plenty of projects described as open source when the firmware is open source and the hardware is closed but this is the first time I've seen one wher…

[deleted]
Post reply on HN