Lecture 12: Distributed Transactions

  • Distributed Transactions
    • Concurrency Control
    • Atomic Commit
    • Above done in an abstraction call a transaction

  • BEGIN_X
  • END_X
  • example of a read only transaction

  • ACID
    • Atomic - all or nothing vs failure
    • Consistent
    • Isolated - Serializable
    • Durable

  • serial order of execution of transactions

  • Concurrency Control
    • pessimistic - locking
    • optimistic - occ

  • concurrency control with 2 phase locking

  • distributed transactions
    • want atomic all or nothing - but what if failure
    • two-phase commit!

  • transaction coordinator
    • sends prepare messages to everybody
    • yes/no
    • commit
    • ack
    • lock/unlock - but can crash
      • use a log
      • that is why we have yes/no and ack response

  • individually replicated - raft/group
  • sharding?