Antidote: the highly-available geo-replicated database with strongest guarantees
Cloud-scale applications need highly available, low latency responses to serve millions of users around the world. To meet this need, applications have to carefully choose a high performance distributed database. Antidote provides features that help programmers to write applications that are both scalable and correct. Antidote has the same availability, performance and horizontal scalability as so-called AP databases, but ensures stronger guarantees than existing ones (e.g. Cassandra or Riak). Some of the features of Antidote are:
- CRDTs (Conflict-Free Replicated Data Types): replicated, available high-level data types with guaranteed convergence. Antidote supports last-writer-wins (Cassandra-style) registers, multi-value (Dynamo-style) registers, counters (increment/decrement), bounded (e.g non-negative) counters, sets (add/remove elements), maps (put/get), and lists (add at position/remove at position). Users can add their own application-specific types.
- Scalable data centres (DCs): a DC can comprise any number of servers. Data is sharded across servers. Sharding is transparent, i.e. an application transaction identifies an object by its key.
- Geo-replication: To provide fast responses to both read and write requests, run Antidote DCs at geo-distributed locations. Antidote serves requests from any available DC. Antidote responds immediately, even when there are failures or network partitions.
- Transactions:Antidote supports general-purpose transactions. A transaction reads and updates multiple data items, in an all-or-nothing and consistent manner. By default, a transaction is highly-available, i.e. not ACID.
- Causal Consistency (CC): CC is the strongest highly-available consistency. It ensures that, if a transaction T2 depends on T1, then all replicas will observe T1 before T2. For instance, if an application first changes the admin password, then enables admin login, no one will be allowed to log in with the default password — a common occurence with a classical AP database.
Antidote is built using modern collaborative engineering practices, with a layered architecture that allows addition or changes of features, systematic code reviews, push-button tests and benchmarks. It is an open-source project hosted on github under an Apache license.