← Graph

Aggregate-Scoped Sequence Number

concept 2 connections

Cheat shared by Pašalić: every event should carry not only a global identifier and global order number but also a sequence number locally scoped to its aggregate. Combined with database constraints (e.g. PostgreSQL), this prevents events arriving out of sync from multiple instances of the write model. Knowing this up front avoids painful refactors later.

category
practice
about
Aggregate-Scoped Sequence Number concept
Shared as a key cheat for keeping multi-writer event streams consistent.
concept Aggregate-Scoped Sequence Number
related_to
PostgreSQL tool
Pašalić recommends a store with constraint support such as PostgreSQL to enforce per-aggregate sequence numbers.

Provenance

Read by
9 extractions