On ACID and BASE Architectures

On ACID and BASE Architectures - An Essay

“Necessity is the mother of invention”

As databases have evolved to meet changing needs, they have driven the contemporary dichotomy between ACID and BASE style databases. In the 1970s and 1980s, ACID databases emerged closely associated with SQL and the relational database model as pioneered by Edgar Codd of IBM. Naturally, in that business driven world where personal computing was nascent and networking was largely aspirational for consumers, the requirements of database applications skewed to prioritizing data integrity. As the internet proliferated into the 2000s with billions of hosts, ACID databases struggled to scale with applications, prompting the BASE style that would eschew the guarantees of ACID for the benefit of scaling in a distributed way.

Eventual Consistency

The most acute point of contention between the ACID and BASE style is their notions of consistency and eventual consistency. In an ACID database, once a write transaction is committed, subsequent reads will return the value written. In a BASE database, once written to, subsequent reads may or may not immediately reflect the value written, but eventually in time, all reads will return the same value as written. As a consequence, applications that build upon eventual consistency must have their application logic be tolerant of outdated data and how that could impact users and other services. However, by accepting that consequence, applications can leverage horizontal performance scaling, high availability and localized application/database instances that reduce latency. These are benefits that evaporate with ACID because of the need to synchronize a consensus.

“The needs of the many outweigh the needs of the few”

When choosing between ACID and BASE for an application, it’s important to consider that in many cloud scale applications, applications are no longer written as monolithic applications composed of a single homogenous technology stack, but instead decompose themselves into individual microservices that each performs a focused set of tasks. In such a microservice environment, it could be conceivable to have a critical service use an ACID database and non-critical services using BASE databases. In this way, the only choice to be made is picking the database that best supports a narrow well-defined need.

Powered by Hexo and Hexo-theme-hiker

Copyright © 2019 - 2024 A Software Craftsman's Tale All Rights Reserved.

Stefan Buszwatiuk