Transactions and Distributed Transactions

A two-for-one lecture about nested and flat transactions, concurrency control, and the problems that arise when the resources involved in the transactions are distributed to a number of servers!

The topic of the first part is transactions. Transactions are a crucial concept in many distributed systems, most notably, in databases. The goal is to ensure that data remains in a consistent state, even if accessed by several processes simultaneously and in spite of server crashes. A client specifies a set of operations on the data as a transaction. The server(s) must guarantee that either the entire transaction succeeded or failed -- partial application of the operations may leave the data in an inconsistent state. We study the techniques required to achieve this effect in the simplest case (only a single server) during the first part of the lecture. During the second part, we study the distributed case (several servers) and its added complexity, due to the required agreement process among servers (should a transaction be committed or aborted?). Also, concurrency control becomes more interesting, including e.g. distributed deadlock detection.

Download the lecture notes (Transactions) and lecture notes (Distributed Transactions) as PowerPoint files (you can easily print handout views using PowerPoint, or just use these (Transactions) and these (Distributed Transactions). You will also want to view the Chapter 13 and Chapter 14 slides from the book.

Reading

Intensive reading: 13.1 - 13.7, 14.1 - 14.5

Extensive reading: 14.6, 13.1.1

Exercises

Primary set: 13.2 - 13.4, 13.7, 13.8 - 13.14, 13.16, 13.18, 14.4, 14.7, 14.9 - 14.11

Secondary set: 13.5, 13.6, 13.17, 14.6, 14.8