News for hackers. Stuff that matters.
Re:Living Without Atomic Clocks (2016) by AmericanChopper on Monday March 23, 2020 @03:15PM (#22667631)
For most use cases, you’d just give up serializability and implement an eventually consistent model. For anything that requires something more strict, you just wait. Longer. Processing a check used to take several days. Processing an earth bank check from mars would need to take about half an hour on average. Though that’s perhaps not the best example, because even today we process checks using an eventual consistency model.

Edit: A strict consistency earth > mars transaction would actually take longer, because 30 minutes is just an average round trip, and you’d need more than one.

Re:Living Without Atomic Clocks (2016) by daxfohl on Monday March 23, 2020 @05:32PM (#22669017)
Note that even with Google Cloud Spanner (last I checked anyway), the distributed consistency model was only available among machines within the same datacenter, as orchestrating transactions across regions would be latency prohibitive. I think you can get cross-region read replicas but that's all. (And I may even be mixing that up with some other cloud database).

So interplanetary, yeah one planet is going to be the central transaction handler and everyone else is going to have to deal with it. So likely things that require transactions, you'll have to have enough cash in the bank in your Mars account if you want quick transactions, and expect wiring money from Earth to take a while.

Coming back to the current day, if you need low-latency global transactions just here on Earth, then that's probably how you'd have to design it. You prime each region with a certain account "limit" of whatever it is you're transacting to use in local transactions, and when that limit gets low you transact some more from your central data store back into your regional account, or something along those lines. It'd be a two-stage thing.

Re:Living Without Atomic Clocks (2016) by AmericanChopper on Monday March 23, 2020 @05:53PM (#22669228)
That is pretty much how it’s done today. Global transactions are authorised in real time and then settled periodically. If I remember correctly, Visa does a settlement every 3 or 4 hours, then each of the merchants and other processors in the chain run their own schedule, so it can take a few days for balances to correctly reflect a transaction.

I remember being very impressed by Spanner when I first heard about it, but as you can see in the OP, it does make a lot of consistency guarantees through sheer brute force. It simply throws power/resources at problems which would generally be considered impractical when normally designing a distributed system. An approach which does of course have its limits (not to say it isn’t still impressive, it’s a great system).