Distributed and replicated databases
Problems
- Distributed query processing problem
Compute a query over relations stored at several sites while minimizing data shipped, response time or total cost.
core - Data allocation problem
Place fragments and their copies on sites to minimize storage, query and update cost under capacity limits. The decision version is NP-complete.
advanced
Algorithms
- Parallel hash join
Hash-partition both inputs across the nodes on the join key in one round of messages, then let each node join its pair of partitions locally. A frequent key value puts all its work on one node.
1 languagescore - Primary copy locking
Distributed two-phase locking in which each item has one primary copy whose site grants all locks on the item.
1 languagescore - Read-one write-all
A replica control protocol that reads any one copy of an item and writes all copies, or all available copies in its fault-tolerant form.
1 languagescore - Bond energy algorithm
A greedy heuristic that permutes the rows and columns of a matrix so that large values sit next to each other. On an attribute affinity matrix it groups attributes that queries use together.
1 languagesadvanced - Chandy-Misra-Haas edge chasing
Detects a deadlock spread over sites by sending small probes along the wait-for edges between sites. A probe that comes back to its initiator shows a cycle of waiting processes.
1 languagesadvanced - SDD-1 semijoin optimization
Algorithm OPT of SDD-1: add the most profitable semijoin while its estimated benefit is larger than its cost, then send the reduced relations to the site that holds the most data.
1 languagesadvanced - Calvin deterministic transaction protocol
Agree on a global order of transaction inputs first, then execute them deterministically at every replica, so no two-phase commit is needed.
1 languagesresearch - Clock-SI
Snapshot isolation for partitioned data that takes snapshot and commit timestamps from loosely synchronized local clocks, with no central timestamp server.
1 languagesresearch - Percolator transaction protocol
Snapshot isolation over a key-value store that has only single-row transactions, using a timestamp oracle, a primary lock per transaction and lazy cleanup by readers.
1 languagesresearch - RAMP transactions
Read atomic transactions over partitioned data: a reader sees all or none of the writes of each transaction, never waits for other clients, and needs at most two round trips.
1 languagesresearch - Schism workload-driven partitioning
Partition and replicate tuples by a balanced min cut of a graph that joins tuples used by one transaction, then explain the cut as range predicates. A heuristic for few distributed transactions.
1 languagesresearch
Concepts
- Shared-nothing architecture
A parallel database design in which each node has its own processors, memory and disks, and the nodes work together only by messages. Partitioned data lets it scale out.
intro - Eager and lazy replication
Eager replication updates every copy inside the transaction, lazy replication after commit; in the analytical model of Gray et al., eager deadlocks grow as the cube of the node count.
core - Highly available transactions
The isolation and session guarantees that a replicated database can give while each client still gets an answer during network partitions that may never heal.
research
Definitions
- Horizontal fragmentation
Split a relation into subsets of rows defined by selection predicates or by a join with another fragmented relation.
1 languagescore - One-copy serializability
An execution on replicated data is one-copy serializable when it is equivalent to a serial execution on a single copy of each item.
core - Vertical fragmentation
Split a relation into projections that each keep the key, grouping attributes that queries use together.
1 languagescore
Theorems
- Invariant confluence
Transactions can keep an invariant with no coordination, staying available and convergent, exactly when merging two states reachable from a common valid state keeps it.
research