14.3.1: From ACID to BASE- Embracing Eventual Consistency

Introduction to Cloud Computing · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    Read aloud

    How

    Speed: 1×
    Light up
    Highlight

    Symbols: Mulberry Symbols, © 2018–2026 Steve Lee, CC BY-SA 4.0 (licence, the set), the site's own copies.

    From LibreTexts, under CC BY 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    14.3.1: From ACID to BASE- Embracing Eventual Consistency

    Classic databases ensure ACID properties (Atomicity, Consistency, Isolation, Durability) but rely on strong coordination – which can become a bottleneck or single point of failure in distributed systems. Cloud architects have trended toward BASE philosophies (Basically Available, Soft state, Eventual consistency) for many scenarios, accepting that not all parts of a system need strict serializable transactions if they can converge eventually.

    Eventual consistency means that all replicas of data will converge to the same value eventually if no new updates are made, but at any given moment, different nodes might see different values. This is common in geo-replicated databases (like Amazon Dynamo, Cassandra) which choose availability over immediate consistency. A key insight is that for many use cases (caches, social media feeds, etc.), allowing temporary inconsistency yields much higher availability and performance. CRDTs and event sourcing are two cutting-edge techniques to achieve eventual consistency with specific benefits:

    • CRDTs (Conflict-Free Replicated Data Types): These are data structures designed to merge concurrent updates in a mathematically sound way, guaranteeing that all replicas converge to the same state without central coordination. Each CRDT defines a merge function that is commutative – meaning updates can be applied in any order and still result in the same final state. For example, a G-Counter CRDT allows increments on any replica; when replicas sync, their values are added to get a global total (ensuring no lost counts). CRDTs exist for sets, sequences, graphs and more. The power of CRDTs is evident in collaborative applications like Google Docs or decentralized apps – multiple users can edit concurrently, even offline, and when changes propagate, the CRDT merge resolves conflicts consistently (often achieving what a user would intuitively expect). For instance, Redis offers CRDT-based data types for globally distributed caches. We predict wider use of CRDTs in cloud programming frameworks – possibly integrated into languages or service meshes – making it easier for developers to choose eventually consistent data types when appropriate. CRDTs effectively say: let every replica accept updates (no blocking), and let math reconcile the end state. This is a powerful alternative to strict serial order of operations.
    • Event Sourcing and CQRS: Event sourcing is an architectural pattern where state changes are logged as a sequence of immutable events, rather than storing just the latest state. Every update to an entity (e.g., an Order in an e-commerce system) is recorded as an event (OrderCreated, OrderItemAdded, OrderPaid, etc.), and the current state is derived by replaying these events. This provides a complete history (audit trail) and naturally supports rebuilding state in case of partial failures. The approach shines in distributed systems because events can be published to multiple services (via an event bus or log) allowing eventual consistency via replication. Each service can have its own materialized view (or “read model”) of the data, updated asynchronously by subscribing to relevant events. The concept pairs with CQRS (Command Query Responsibility Segregation): commands (writes) append events, and queries read from optimized view storages. One advantage is loose coupling – services don’t call each other synchronously in a transaction; instead, they react to events. For example, a Payment service listening to an OrderPlaced event will eventually record a payment, and a Shipping service will eventually act on a Paid event, etc. This yields eventual consistency: the Order’s status might take a few seconds to reflect “Shipped” after payment, but the system avoids distributed locks or partial commits. A case study is an online retailer that migrates from a monolithic order database to an event-sourced system: it found improved scalability and auditability, at the cost of complexity in reasoning about eventually consistent data. The trade-off is clear – simpler scaling and resilience (events can be retried, out-of-order events can be handled) in exchange for more complex application logic to handle the fact that some views are stale.

    The combination of event sourcing and CRDT-like conflict resolution is a frontier of research. In fact, some see them as complementary rather than competing: CRDTs handle low-level concurrent data merges, while event sourcing handles high-level business logic by logging intentions (events). One Medium article dubbed the tension “CRDTs vs. Event Sourcing: The architecture war that will define the next 10 years,” noting that they represent “two fundamentally different philosophies of truth in distributed systems”. Event sourcing sees truth as the complete history (and state is a materialized projection), whereas CRDTs see truth as emerging from merging state from all participants. There’s active work on marrying these – e.g. using CRDTs to merge event logs from offline devices.


    This page titled 14.3.1: From ACID to BASE- Embracing Eventual Consistency was last modified on Sat, 12 Sep 2026 08:40:50 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Felix Amoruwa.