<aside> š” On-line Transaction Processing (OLTP)
Short-lived read/write txns.
Small footprint.
Repetitive operations.
</aside>
<aside> š” On-line Analytical Processing (OLAP)
Long-running, read-only queries.
Complex joins.
Exploratory queries.
</aside>
We can assume that all nodes in a distributed DBMS are well-behaved and under the same administrative domain.
Do not trust the other nodes ā Byzantine Fault Tolerant protocol for txns (blockchain).
When a multi-node txn finishes, the DBMS needs to ask all the nodes involved whether it is safe to commit
Two-Phase Commit (Common)
Three-Phase Commit (Uncommon)
Paxos (Common)
Raft (Common)
ZAB (Apache Zookeeper)
Viewstamped Replication (ļ¬rst probably correct protocol)
Widely used for distributed DBMSs that are local to each other
Phase 1
The client sends a Commit Request to the coordinator.
The coordinator sends a Prepare message, asking the participant nodes if the current txn is allowed to commit.
If the coordinator receives an OK from all the participants
If anyone sends an Abort to the coordinator:
Abort
Phase 2
Success