Lecture 13: Spanner
- globally replicated database
-
each data center
- copies for redundancy and to be near clients
- sharded - throughput
- has a leader/follower
-
R/W transactions
- BEGIN
- x = x + 1
- y = y + 1
- END
- BEGIN
- 2 Phase Commit and 2 Phase Locking in Paxos Groups
- do a read transaction
- to master of paxos group - replicate to others
- 2PC with other master of paxos group
- commits and leaders of paxos group can replicate to copies
- simple wishes - wanted constraints
- serializable
- external consistency
- can't just read latest value rip
- Snapshot Isolation
- imagine all time is synchronized
- can now do timestamp
- need clock synchronization
- gps master
- Google has TrueTime
- returns (earliest, latest)
- get latest
- start
- commit
- delay time stamp such that the earliest it could possibly be is greater that the latest another transaction could be
- the latest for the T1 timestamp is 10
- so read after 12