Ambar: Indispensable for Financial Ledgers

Tom Schutte

Jul 2, 2024

5 Mins Read

Ambar is indispensable in domains such as finance, where customer trust and regulatory compliance are priorities. Such domains require a precise understanding of how a system arrived at a particular state instead of only storing the latest state. Systems requiring this level of auditability use ledgers as a critical architecture component. A ledger is an append-only list in which every entry corresponds to an alteration to the system's state (an accountant's dream). In a nutshell, Ambar makes it easier, safer, and faster to work with ledgers.

Background on Read Models

Nowadays, storing ledgers is a solved problem—ranging from SQL tables to specialized ledger databases and document stores. But an inevitable question remains. What is the system's current state if the ledger only stores mutation operations? For example, what is the current balance of a given account if the ledger only contains a list of credits and debits? A mathematician would argue that the balance is baked into the ledger but is divided across many entries. However, a software engineer would quickly retort that reading many entries in the ledger is impractical when answering a question as simple as a given account's balance. Thus, software engineers build read models of the ledger, i.e., interpretations of its current state based on aggregating its entries. For example, banks use read models to track account balances and investment returns, prevent fraud, run loyalty programs, and collect updates for customers.

Ambar and Read Models

Building a new read model is highly complex. It requires processing all historical entries in the ledger with new business logic. This is where Ambar is indispensable—it makes it easier, faster, and safer to process historical entries and keep a read model up to date as new entries arrive. Ambar empowers engineers to focus on business logic, not the difficulties of loading historical data, processing it correctly, and then processing new data. The following is a list of the features and benefits that Ambar provides to engineers building read models:

  1. Simple Abstractions:

    1. Ambar provides two core components: data sources and data destinations.

    2. A data source ingests data from a ledger (only once) and caches a copy of all entries.

    3. A data destination forwards entries to an HTTP endpoint built by the end user (a software engineer). The endpoint contains the business logic required to create a read model.

    4. Benefits: Low maintenance burden, speedy onboarding for new engineers, low cognitive load, faster time to market.

  2. Correctness Guarantees:

    1. Implementing correctness guarantees such as exactly-once processing and ordering is really difficult.

    2. Building it in-house is error-prone (over 99% of teams have fatal edge cases).

    3. Using a managed vendor other than Ambar does not provide correctness guarantees on an end-to-end basis and thus still requires in-house work.

    4. Ambar provides correctness guarantees on an end-to-end basis out-of-the-box.

    5. Benefits: Upholding customer trust, complying with regulatory requirements, and accelerating time to market.

  3. Merging & Filtering

    1. Ambar can send arbitrary combinations of data sources to a data destination.

    2. Ambar accepts a filter specification that selects subsets of entries from data sources to be sent to data destinations.

    3. Benefits: Enabling complex features that provide unique business value, reducing bandwidth, and processing historical data in minutes instead of weeks.

  4. Infinite Storage:

    1. Ambar data sources can store an arbitrary amount of data without performance degradation, keeping up with the biggest ledgers.

    2. Benefits: extended auditability as required by regulators.

  5. Parallel Processing

    1. Ambar data destinations forward data in parallel (with a partition key specified by the end-user).

    2. Benefits: Processing historical data in minutes instead of weeks.

  6. Auto Scaling:

    1. Ambar data destinations use the optimal degree of parallelization when sending data.

    2. How? By keeping track of the tipping point for degraded performance and maximizing send rates without crossing the tipping point.

    3. Benefits: Avoiding downtime and incidents, processing historical data in minutes instead of weeks.

  7. Low Latency:

    1. Ambar's streaming mechanism ensures that real-time data is available for read models.

    2. This eliminates staleness errors.

    3. Benefits: Upholding customer trust and complying with regulatory requirements.

As previously mentioned, Ambar makes working with ledgers easier, safer, and faster. It is easier because engineers can focus on their business logic rather than data infrastructure. It is safer because it avoids critical errors that cost businesses money and lose customer trust [1]. It is faster because it accelerates development time and speeds up data processing.

[1] For a separate article on safety, please read this blog post to discover how a lack of safety causes losses of up to 20 percent of operating profit!

Over $3B in Transactions Processed

Discover what Ambar could do for you!

Over $3B in Transactions Processed

Discover what Ambar could do for you!

Over $3B in Transactions Processed

Discover what Ambar could do for you!