Upgrade to Pro — share decks privately, control downloads, hide ads and more …

由Spanner來看Google資料庫的前世今生

 由Spanner來看Google資料庫的前世今生

2012年秋,網際網路資料庫 @ 國立中正大學資工所

Szu-Kai Hsu (brucehsu)

November 07, 2012
Tweet

More Decks by Szu-Kai Hsu (brucehsu)

Other Decks in Technology

Transcript

  1. CAP

  2. NoSQL datastores are highly scalable, but their limited API and

    loose consistency models complicate application development. “ “
  3. 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;
  4. 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
  5. (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);
  6. 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. “ “
  7. Data model is almost identical to Megastore almost identical Basic

    unit defined as Directory Directory Same prefix key, therefore adjacent
  8. Data model is almost identical to Megastore almost identical Basic

    unit defined as Directory Directory Same prefix key, therefore adjacent Fine-grained mapping
  9. 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
  10. Paxos is here to rescue, again Paxos will make sure

    ALL logs are copied to every replicas. ALL logs
  11. Real Innovation lies in time TrueTime API utilizes atomic clock

    & GPS to determine the order of each transactions atomic clock GPS