Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
由Spanner來看Google資料庫的前世今生
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Szu-Kai Hsu (brucehsu)
November 07, 2012
Technology
370
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
由Spanner來看Google資料庫的前世今生
2012年秋,網際網路資料庫 @ 國立中正大學資工所
Szu-Kai Hsu (brucehsu)
November 07, 2012
More Decks by Szu-Kai Hsu (brucehsu)
See All by Szu-Kai Hsu (brucehsu)
Running Life Lean
brucehsu
0
190
Core Unleashed Part II: Introduction to GobiesVM (and STM) @ RubyKaigi 2014
brucehsu
0
2.2k
[RubyConf.tw 2014] Cores unleashed - Exploiting Parallelism in Ruby with STM
brucehsu
0
2.3k
用 Go 打造程式語言執行環境:實例剖析 [OSDC.tw 2014]
brucehsu
3
2.4k
pickbox @ OSDC.tw 2013 Lightning Talk
brucehsu
0
130
Building Web 2.0 APIs
brucehsu
1
170
Rapid Web Development by Example
brucehsu
3
3.2k
TechWed@CCU #0
brucehsu
2
610
Chromium OS
brucehsu
2
250
Other Decks in Technology
See All in Technology
その Valkey 使いこなしていますか?
onk
PRO
5
1.6k
Metadata - Section 1: HTML Basics
mohab1
0
130
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
300
Running Kotlin + Quarkus with Lambda
nealle
1
4k
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
190
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
5
1.2k
スプシの手作業からの解脱 ~更新はClaude Codeに、見せ方と使い方はGASアプリに任せる~
kentarofujii
0
160
会社紹介資料 / Sansan Company Profile
sansan33
PRO
31
430k
S3 Filesで挑む! 八戸せんべい汁の食べ頃問題
usanchuu
0
120
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
290
会社説明資料
persolserverworks
0
9.8k
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
23k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Building Applications with DynamoDB
mza
96
7.2k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Raft: Consensus for Rubyists
vanstee
142
7.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
How to Ace a Technical Interview
jacobian
280
24k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
Transcript
由 Spanner來看 Google資料庫 的 前世今⽣生 Szu-Kai Hsu (brucehsu)
Spanner is a scalable multi-version globally-distributed synchronously-replicated database
BigTable
Handling
Handling really
Handling really BIG DATA
key-value
key-value { “CCU”: “123”, “NCTU”: “113”, “NTU”: “112” }; key
key-value { “CCU”: “123”, “NCTU”: “113”, “NTU”: “112” }; value
distributed
Lack of transaction, think of our first project.
CAP
C A P
Consistency A P
Consistency Availability P
Consistency Availability Partition tolerance
Consistency Availability Partition tolerance Consistency
Megastore
NoSQL datastores are highly scalable, but their limited API and
loose consistency models complicate application development. “ “
In Megastore, data model is declared in a strong-typed schema
strong-typed schema CREATE TABLE User { required int64 user_id; required string name; } PRIMARY KEY(user_id), ENTITY GROUP ROOT;
Based on BigTable BigTable
PRIMARY user_id PRIMARY user_id, nyan_id
Local and Global Indexes are introduced: Local Index Find corresponding
data in entity group Global Index Find corresponding data in external groups Local Index Global Index
(user_id, born,nyan_id) For local index CREATE LOCAL INDEX NyanByBorn ON
Nyan(user_id, born); CREATE LOCAL INDEX NyanByBorn ON Nyan(user_id, born);
Consistency achieved via Paxos algorithm Paxos 2 Replicas 1 Witness
At least
Replica consists of Replication server and Coordinator Replication server Coordinator
write oversee
Witness’ Replication server only writes logs logs
Average Latency: 100-400ms Poor write throughput 100-400ms
Spanner ,finally.
We believe it is better to have application programmers deal
with performance problems due to overuse of transactions as bottlenecks arise, rather than always coding around the lack of transactions. “ “
Data model is almost identical to Megastore almost identical Basic
unit defined as Directory Directory
Data model is almost identical to Megastore almost identical Basic
unit defined as Directory Directory Same prefix key, therefore adjacent
Data model is almost identical to Megastore almost identical Basic
unit defined as Directory Directory Same prefix key, therefore adjacent Fine-grained mapping
Data model is almost identical to Megastore almost identical Basic
unit defined as Directory Directory Same prefix key, therefore adjacent Fine-grained mapping Interleaved rows gain performance
Two-phase commit for distributed transactions Two-phase commit 1Vote Coordinator Participants
Two-phase commit for distributed transactions Two-phase commit 2Commit Coordinator Participants
Locking remains a big issue Locking Especially when someone went
down, causing deadlock, literally.
Paxos is here to rescue, again Paxos will make sure
ALL logs are copied to every replicas. ALL logs
Real Innovation lies in time TrueTime API utilizes atomic clock
& GPS to determine the order of each transactions atomic clock GPS
NewSQL is the new NoSQL and Spanner is the best
example so far.