databasedistributed sql

NewSQL徹底入門 分散DBnのアーキテクチャからユースケースまで

NewSQL Technical Elements

  • Storage Engine
    • LSM-Tree
  • Sharding
    • Hash Sharding, Range Sharding
  • Consensus Algorithm
    • Raft, Paxos, ...
  • Distributed Transaction
    • Transaction Isolation Level
      • serializable
      • snapshot isolation
      • repeatble read
      • read committed
      • read uncimmitted
    • Pessimistic Concurrency Control / Optimistic Concurrency Control
    • Clock Skew
      • Spanner: [earliest, latest], Atomic Clock, GPS
    • Linearlizability
    • Timestamp Oracle TiDB
      • Under geo partitioning, effect network connection/latency
    • Hyblid Logical Clock

In fifth section, regarding write skew. This issue originates from a buisiness logic example described in "Designing Data-Intensive Appliation". It occurs between two transactions whose target redcords are different. While I agree that changing the transaction isolation level to serializable is one solution, in this case I believe it is better to redesign the table schema or introduce an explicit locking mechanism to coordinate the two transaction rather than changing the isolation level.

Vendor Production Architechture

  • TiDB, CockroachDB, YugabyteDB