Strong consistency

Utilize strong consistency guarantees where it matters. You may use our optimistic concurrency support to handle high-contention or eventual consistency for decoupling reads from writes.

The core of Event Sourcing is to provide strong consistency when writing data. During the update of an aggregate, we must be sure no other application or user have written any simultaneously.

How we provide strong consistency

Serialized provide strong consistency using optimistic concurrency control (OCC). You provide an expected version for the given aggregate when storing events, and the platform guarantees that the store operation only succeeds if the current version of the aggregate matches the expected version.

This guarantee makes it possible to build business-critical systems using Serialized.

Why strong consistency matters?

To build applications that are critical to the business we need a guarantee that the data we store is consistent. We need to trust that our data is a result of a successful transaction that passed our business rules/domain model. Traditionally we've used relational databases to provide this guarantee and today there are also multitude of products in the NoSQL space providing this guarantee.

The difference between Serialized and traditional databases is that we provide strong consistency while storing the data as an immutable sequence of events instead of hierarchical or relational structure.

Which products provide strong consistency?

Most databases provide similar guarantees in terms of consistency. Queues, streaming platforms (such as Kafka) and event distribution solutions, however, generally does not provide this guarantee.

Read more about why you should not use Kafka for event sourcing.