liveBook · Manning

Event sourcing

Event sourcing is a persistence pattern in which state changes are recorded as an ordered sequence of events from which current state can be derived or reconstructed.

How 3 Manning books explain it

Functional Programming in C#, Second Edition

An event-sourced system persists state-changing events that can be replayed to reconstruct its state.

How it is used
Uses event sourcing as an append-only persistence model that derives entity state from state-changing events.
How deep it goes
Works through event persistence, state reconstruction, command and query flows, and domain-fit trade-offs.
Examples
Uses bank-account events and statements to demonstrate replay and views, and online auctions to assess domain fit.
What you can do after
Builds a basic event-sourced persistence flow from scratch, including event storage, state reconstruction, and view-model creation.

Read how Functional Programming in C#, Second Edition explains event sourcing →

Kafka for Architects

An event-sourced system persists state changes as an ordered sequence of events from which current state can be reconstructed.

How it is used
Uses Kafka’s retained event log as the authoritative history for reconstructing state and supporting event-driven processing.
How deep it goes
Explains immutable events, replay, retention, snapshots, and database trade-offs, but stops short of implementation walkthroughs.
Examples
Demonstrates customer-address replay and order enrichment through a change-log join.
What you can do after
Evaluate Kafka event-sourcing designs by balancing replayability, snapshots, query needs, retention cost, and database fit.

Read how Kafka for Architects explains event sourcing →

Akka in Action, Second Edition

Event sourcing is a persistence technique that stores state changes as an ordered sequence of events and reconstructs current state by replaying them.

How it is used
Uses a journal to make actor state durable and recoverable while keeping application logic expressed through messages.
How deep it goes
Explains commands, validation, event append, replay, immutability, and versioned deserialization; defers event-adapter details.
Examples
Uses Conversation actors with MessageAdded events and cargo events whose schemas gain or lose fields over time.
What you can do after
Operate persistent actors by validating commands, appending events, replaying journals, and accommodating event-schema versions.

Read how Akka in Action, Second Edition explains event sourcing →

Also covered in

What to know first

Related concepts

Questions about event sourcing

What is event sourcing?

Event sourcing is a persistence pattern in which state changes are recorded as an ordered sequence of events from which current state can be derived or reconstructed.

Which Manning books explain event sourcing?

Functional Programming in C#, Second Edition, Kafka for Architects and Akka in Action, Second Edition.

What should I know before learning event sourcing?

Manning books that teach event sourcing usually introduce event and state first.

What is the difference between event sourcing and assertion-based approach?

Event sourcing is a persistence pattern in which state changes are recorded as an ordered sequence of events from which current state can be derived or reconstructed. A data persistence model that stores assertions about entities and attributes, retaining facts associated with particular time ranges.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.