A Primer on ACID Transactions: The Basics Every Cloud App Developer Must Know
ACID transactions were a big deal when first introduced formally in the 1980s in monolithic SQL databases such as Oracle and IBM DB2. Popular distributed NoSQL databases of the past decade including Amazon DynamoDB and Apache Cassandra initially focused on “big data” use cases that did not require such guarantees and hence avoided implementing them altogether. However, ACID transactions have made a strong comeback in the last several years with the launch of next-generation distributed databases that have built-in support for them.
This post serves as a primer on ACID transactions for app developers building distributed apps in the cloud. It highlights:
- Why ACID transactions remain a fundamental need for cloud apps?
- What’s necessary to implement them in databases?
- Why monolithic databases have them but 1st generation distributed databases don’t?
Defining a Transaction
A transaction symbolizes a unit of work performed within a database. It is often composed of multiple operations.
The example below shows a transaction at a bank with 4 operations that transfer $100 from Alice’s account at one branch to Bob’s account at another branch.