4 ms·
I have two suggestions, one useful and one less useful: 1) Given two events that happened in two different locations, one happened before the other or they hap
by ZoFreX 10y ago
I have two suggestions, one useful and one less useful:
1) Given two events that happened in two different locations, one happened before the other or they happened at the same time [1]
2) All the devices comprising your system will agree on what offset each timezone is (alternatively: will have the same version of the tzdb)
Number 2 is not a theoretical problem: if you have users in a country where the timezone can change at short notice (e.g. Turkey), how do you handle the fact that across all the different Android versions their phones will have different opinions on what the time is and what timezone they are in?
[1] https://en.wikipedia.org/wiki/Relativity_of_simultaneity https://en.wikipedia.org/wiki/Relativity_of_simultaneity
- GeneralMayhem 10y ago(1) is not a theoretical problem in distributed systems. I work on a system that involves malicious actors such that allowing subtle timing problems can cause very real revenue impact, and defining consistency in a way that converges quickly with only what amounts to a vector-clock definition of time is tons of fun.
- ZoFreX 10y agoI was deliberately careful with the wording - yes, in distributed systems, we may be unable to determine which event came first. But one of them did happen first in reality, we just can't tell which. However, in some cases (see the Wikipedia link) it's not even true that one of them did happen first - it depends on where you observe them from and there is no definitive answer! Relativity is weird.