Distributed DBMS: Overview & Concurrency Control
Goal: a small-scale (dozens of sites) distributed DBMS
- Location transparency: users dont know where the data is
- Performance transparency: performance independent of submission site
- Copy transparency: objects can be copied, and copies are maintained automatically.
Critical for availability
- Transaction transparency: looks like single-site xacts
- Fragment "transparency": tables can be fragmented to different sites
- Schema change transparency: schema updates at a single site affect global schema
- Local DBMS transparency: shouldnt matter what DBMS is running at each site (ha!)
Nobody provides all of this (#7 & #3 are still major research field)
IBM Almadens R* was the most "real" DDBMS prototype.
- VTAM/CICS provided communication
- Good optimizer, concurrency control
Others:
- SDD-1: done at CCA, never really ran. PDP-10s on Arpanet. Strange design decisions
based on unreasonably slow network.
- Distributed INGRES: UCB, also never ran. Lack of UNIX networking software (pre TCP/IP!).
- Commercial vendors beginning to provide this functionality
The R* Distributed DBMS
Goals
- location transparency
- local privacy & control
- local performance on local queries
- no central dependencies: site autonomy
- no central catalogs
- no central scheduler
- no central deadlock detector
Tables can be
- dispersed
- replicated
- partitioned:
- horizontal partitioning (by predicate)
- vertical partitioning (but a key at each partition)
- snapshots
Table names: user_name@user_site.object_name@birth_site
Catalogs store info on local objects, and objects born locally (along with pointers to
current sites)
Remote catalog info is cached as hints:
- invalid cache entries are detected easily and updated
- catalog entries have version numbers
a catalog entry for a table:
- System-Wide Name
- type info
- access paths
- view definition (if its a view)
- optimizer stats
To find a catalog entry:
- check local catalog & cache
- check birth site
- check the place the birth site points to
An overview of Distributed CC:
Every transaction gets an xactno: site_name.time (or SN)
deadlocks: shoot the youngest, largest-numbered xact
Commit Protocol you cant just decide to commit:
- some site may not be able to
- you cant distingush inability from slowness!
Two Phase Commit (2PC):
- coordinator says to participants: want to commit? (N-1 messages)
- Participants all vote yea/nay (N-1 messages)
- coordinator tells everyone to commit/abort (N-1 messages)
- participants acknowledge message (N-1 messages)
This does the right thing, but its pretty costly. Next paper improves this.
Distributed Deadlock Detection:
- find and resolve local deadlocks
- pass your waits-for graph around to detect global deadlocks
- next paper does this more efficiently
|