Company
Date Published
Author
Srinivasan Seshadri
Word count
1917
Language
English
Hacker News points
None

Summary

Aerospike's distributed ACID transaction design aims to ensure near-zero impact on read/write command performance, support transactions with arbitrary sequences of reads and writes, guarantee strict serializability, exclude scans and queries from transactions, and provide a high-level client API for managing these transactions. The Aerospike client library coordinates transactions by tracking the state in a replicated monitor record, which allows the server to take over as coordinator if the client fails. The design uses dual records to achieve atomicity and lock primitive, ensuring that replication is aware of dual records. The client tracks all items read and written by the transaction for validation at the end of the transaction. Aerospike 8 achieves strict serializability with a combination of optimistic concurrency control for reads and strict two-phase locking for writes. The system also provides a minor change to ensure single record commands are serializable with transactions, making it an ideal solution for developers seeking rigorous transactional systems.