5 ms·
I've always had an issue with systems assuming a universal time, because physics (Special Relativity) tells us there is no such thing. Two events in different p
by ianopolous 8y ago
I've always had an issue with systems assuming a universal time, because physics (Special Relativity) tells us there is no such thing. Two events in different places will be viewed as having a different order depending on your frame of reference. All that really matters on a physical level is causal connections.
I believe vector clocks capture this semantic. But they have other trade-offs.
- notatcomputer68 8y agoCan't you solve that by just picking a reference frame though?
- ianopolous 8y agoYou need a quite elaborate system of a grid of synchronized, stationary clocks and rods to correctly define a reference frame, which is worse than what's required to come up with a "good enough on earth to some time resolution" true time.
- ianopolous 8y agoTo be clear this is pretty much exactly what the system of GPS satellites does, but without physical rods, and it is very expensive to construct and maintain. This works fine to a certain accuracy as long as you restrict your application to staying on earth.
- xenadu02 8y agoYes, and we all pick the Earth’s gravity well as our reference frame. Differences due to elevation and latitude are too small to measure for purposes of transaction clocks.
- jonas21 8y agoyeah, I’m pretty sure TrueTime is only defined on Earth, and GPS satellites do take relativity into account in their design. http://www.astronomy.ohio-state.edu/~pogge/Ast162/Unit5/gps.html http://www.astronomy.ohio-state.edu/~pogge/Ast162/Unit5/gps....
- hinkley 8y agoHTTP has had a reference frame since 1.0. It’s still one of my favorite features of just about any protocol ever. Cache headers can set expiration times or offsets, but the client and server both send their own time stamp in the message. So when the server says “expire this at noon” but your laptop’s clock is five minutes slow or three time zones away, you can still figure out what the server meant by noon because the server tells you what time it thinks it is now. The accuracy is limited by network delays but for the problem space getting the right answer to the nearest second is still pretty damned good.
- amluto 8y agoSpecial relativity has no such problem. In SR you can easily define a “time” coordinate everywhere such that all events can be timestamped with that coordinate and will respect causality. GR at least usually has this property as well. (It doesn’t in the presence of closed timelike curves. It does in weak gravity and in the FLRW metric in cosmology. I’m not sure about the general strong gravity case.
- ianopolous 8y agoOf course every inertial frame in SR has a well defined time coordinate, but that is not a universal time - other frames will disagree on which of two not-causally-connected events happened first. This is normally explained through the lack of a well defined "simultaneity" across different inertial frames.
- infogulch 8y agoYou are correct that there is no truly capital-U-Universal time, but it doesn't matter. You control the whole system, so just choose one and call it "true time" and make everything participating in the system match it. Simultaneity in all inertial frames can be translated between one another, so if you go to a new place that has, for example, more time dilation due to different gravity, just note the parameters and translate it into your chosen "true time" and adjust the spread.
- ianopolous 8y agoMy point is not that it isn't possible, but that it is arbitrary and has no physical meaning. Writes thrown away in one frame because another concurrent write was "later" would in fact be kept in another frame. This is why it feels like a 'bug' to me conceptually - it's not how the universe works so why should a database need it.
- infogulch 8y agoTo summarize, you're saying 'The universe doesn't need linear serializeability, so why should we?' We build abstractions because they're useful to us, not because they have some special meaning to the universe. Systems with simpler abstractions are easier to understand and therefore build on top of. Complex numbers, for example, have no direct physical meaning in the (non-quantum mechanical) universe but can still be extremely useful and are sometimes the only/best way to solve some classical problems. If you want to use a database where a required step of querying it is specifying a reference frame that the ordering of events is relative to, feel free. "In fact, for any two spacelike separated events, it is possible to find a reference frame where you can reverse the order in which they happen."[1] Personally I'll take a hard pass on bug reports like 'Foreign key constraint fails in reference frame 0.992c at 37.2Mm vector towards Alpha Centauri' which reads like the climax of Dante's Inferno for Systems Programmers. [1]: https://physics.stackexchange.com/a/75765/28368 https://physics.stackexchange.com/a/75765/28368