Calvin
Calvin is a research transaction scheduling and replication architecture that orders transaction inputs before executing them with deterministic concurrency control.
The sequencer logs and replicates inputs; schedulers enforce an equivalent serial order while allowing concurrent execution. Agreement precedes lock acquisition, removing a separate distributed commit phase from the lock-holding interval. This does not remove replication, communication or recovery. Deterministic business-rule aborts remain possible. Recovery uses replicas or replay from checkpoints and retained input history. [1]
The scheduler needs read/write sets in advance. Optimistic Lock Location Prediction uses a preliminary reconnaissance read to discover dependent accesses, then rechecks the prediction during ordered execution. A changed dependency triggers a restart; the preliminary read is not the transaction's authoritative read. [2]
The 2014 evaluation compares deterministic and nondeterministic locking within one prototype. Its no-commit-protocol baseline is deliberately unsafe, used to isolate overhead, not a deployable alternative. Delayed dependent reads add reconnaissance work; slow partitions can propagate stalls because a replica cannot independently shed agreed work by aborting it. [3]
Relations
- related
- Two-phase commit, Two-phase locking, Hyder
Limitations
- The TODS dependent-transaction experiment uses artificial replication delays and single-partition transactions; it is not a measured WAN deployment of that workload. [2]
- Lower contention or fewer commit messages does not guarantee lower end-to-end latency; preprocessing and dependency prediction have costs. [3]
Citations
- Thomson et al. Calvin: Fast Distributed Transactions for Partitioned Database Systems. SIGMOD 2012, sections 1.3-3.2 and 5.
- Thomson et al. Fast Distributed Transactions and Strongly Consistent Replication for OLTP Database Systems. TODS 39(2), 2014, sections 3.2.1 and 7.4.
- Ren et al. An Evaluation of the Advantages and Disadvantages of Deterministic Database Systems. PVLDB 7(10), 2014, sections 3.1 and 3.5-3.7.
Sources & caveats
- Primary-source synthesis of the 2012 design and two distinct 2014 studies. No Calvin execution, benchmark reproduction or failure injection was performed.