4 ms·
The way they achieved their goal was misguided but what you've described skips over large parts of the problem. Why would the server time and phone time be in s
by sleepychu 10y ago
The way they achieved their goal was misguided but what you've described skips over large parts of the problem. Why would the server time and phone time be in sync?
- jstanley 10y agoThey could just use their own canonical time (from their server) instead of hammering NTP. It doesn't say anything about synchronisation between phone and server. EDIT: In fact it is easier to implement it this way than using NTP. I've implemented something similar and I found it easier to add an API endpoint that returns time() than to ship an NTP client...
- Diamons 10y agoBut then you need to manage a server and ensure that the time is running accurately. Why add such a large level of responsibility for little to no gain?
- jstanley 10y agoHow is that extra responsibility? Do you think Snapchat aren't already running servers? And you don't care whether the time on the server is running accurately if you're just using it to generate tokens which are checked against the time on the server. It just needs to be consistent, it could be an arbitrary counter and would still work fine as long as it counted up reliably at consistent intervals.
- Fnoord 10y agoBecause instead of depending on a 3rd party, you depend on yourself (and in this case you'd hammer your own server, and notice). It is not far fetched; Windows and OS X work this way. By default, they use their own NTP servers. OS X even has separate servers for different regions (Europe, Asia, and Americas).
- mulmen 10y agoThey could at least be good citizens and use their success to beef up the NTP pool.
- paulgear 10y agoBecause that's the point of NTP; internally both operating systems use UTC, and in practice most clients can be in sync to within 1 ms or so of the true time, given reasonable connection speed and quality.