Event Sourcing & CQRS is out

Event Sourcing & CQRS: A Comprehensive and Practical Guide to Deeper Insights in Your Software Solutions is on Amazon today, in Kindle, paperback, and hardcover.

Kindle+ subscribers can read the Kindle edition at no extra cost.

Why I wrote it

Across years of engagements I kept making the same case from scratch. A new product owner, a new team, a new set of executives, and the same conversation about why the database keeps forgetting what happened. CRUD systems accept time grudgingly, as a column you remember to add. In event sourcing, time is a first-class citizen. Event sourcing is the facts, in order.

There is material online and some in print, but I never found one source covering the whole subject: how to make the case to the people who fund the work and the people who build it, the advantages and the real costs, the patterns, the tooling, and what production support looks like. So I wrote the one I wanted.

What is in it

Eighteen chapters in five parts, with 72 diagrams and 79 code listings.

Part 1 covers the people side of software and the architecture styles the rest of the book builds on. Part 2 makes the case for event sourcing and CQRS, and then argues against it for two chapters. Chapter 5, on when not to use event sourcing at all, carries the strongest recommendation in the book.

Part 3 is the build. Event Storming and domain-driven design come first, then event sourcing, aggregates, workflows and sagas, event versioning, snapshots, and CQRS. After those come analysis and machine learning on the event history, task-based user interfaces, testing, production support, and migrating legacy systems one bounded context at a time.

Part 4 walks through the reference implementation, and Part 5 collects resources.

The code

The book comes with a public reference implementation in .NET 10 and C# 14: https://github.com/ThomasJaeger/event-sourcing-cqrs. Four event stores, PostgreSQL, SQL Server, KurrentDB, and DynamoDB, sit behind one interface and pass the same contract test suite. The v1.0.0 tag is the release the book describes. It is MIT licensed, so you can take it into commercial work without asking.

Where to start

If you have an existing system, read Chapter 18 first. If you are deciding whether event sourcing belongs in your system at all, read Chapters 4 and 5 first. If you are about to build something new, start with Chapter 6 and get the business into a room before anyone opens an editor.

Thank you

To my wife, who gave me the push to finish it. To my children and my friends, for years of encouragement and long discussions. And to Greg Young, whose talk on event sourcing turned my software world upside down many years ago. The acknowledgments in the book say more.

If the book helps you, an honest review on Amazon is the most useful thing you can do for it. It helps the next engineer decide whether the book is for them.

If you want to talk about applying these patterns to a system you run, the first hour is free: https://legacytomodern.com/book.

One thought on “Event Sourcing & CQRS is out”

Leave a Reply