7 ms·
Thank you for this. I implemented multiversion concurrency control in Java with threads but I want to raise it to multimachine. The problem I have is that the
by samsquire 4y ago
Thank you for this.
I implemented multiversion concurrency control in Java with threads but I want to raise it to multimachine.
The problem I have is that the read and write timestamps need to be available to detect if a transaction between machines conflicts.
How do I synchronize read and write timestamps with minimal latency?
When a database replica receives a transaction for key X, it needs (a) a timestamp that is globally accurate (b) needs to tell other replicas about it so they can detect dangerous read-write dependencies.
I feel it inherently requires serialisation of timestamps to accurately determine what other nodes are doing with data.
Otherwise you get dangerous read-write skew.
(See the whitepaper "Serializable Snapshot Isolation")
Load balancers don't do much work, except shift traffic. I wonder if a load balancer that collects timestamps and enriches requests with timestamp information would be a scalable solution?
- foota 4y agoThis is an example of a system built like you're describing at the end: https://www.pingcap.com/blog/how-an-open-source-distributed-newsql-database-delivers-time-services/ https://www.pingcap.com/blog/how-an-open-source-distributed-... Also see https://tikv.org/deep-dive/distributed-transaction/timestamp-oracle/ https://tikv.org/deep-dive/distributed-transaction/timestamp... Cockroachdb describes their approach here: https://www.cockroachlabs.com/blog/living-without-atomic-clocks/ https://www.cockroachlabs.com/blog/living-without-atomic-clo...