Understanding Eventsourcing
Understanding Eventsourcing
Planning and Implementing scalable Systems with Eventmodeling and Eventsourcing
About the Book
"This is not just another technical book—it’s a roadmap to more predictable, maintainable, and successful software projects. Martin Dilger has created an invaluable resource that I believe will influence how we approach software development for years to come." - Gabriel. N. Schenker
"By reading this book, you won’t just learn new techniques — you’ll transform the way you approach software development. You’ll gain clear, actionable steps to solve problems, communicate with unprecedented clarity, and estimate projects more accurately. In essence, you’ll be equipped to dismantle complexity and foster collaboration like never before." - Adam Dymitruk
"Focusing on a practical implementaion really worked for me. I appreciate the work you have done here." - Gary Craine
"Highly recommended reading" - Michael Plagge
"Thanks for writing the book, it will save me so much time and toil. I really like the Todo pattern to simplify the Saga. Also using an aggregate for uniqueness check is very nice." - William Power
"The book is packed with knowledge and provides concrete example implementations. It advances the entire topic and makes it easier for developers to access. I can only recommend it." - Sebastian Bortz
"The book is really great, practical, easy to read !" - Vincent Vermesh
"thank you and congrats on releasing your book, it has been an extremely enjoyable read" - via Discord
This book gives a practical introduction to eventmodeling and eventsourcing with a focus on how to implement eventsourced systems in practice.
Unlike other books covering the topic, we will really dive into the code and build a softwaresystem basically from idea to running software using state of the art development practices.
In Part I, we´ll cover the foundations of distributed systems. You will learn about CQRS, Eventsourcing and the fundamentals that took me 15 years to learn.
Part II focuses on the modelling part - I will show you how I model information systems using Eventmodeling in a practical way.
Part III really goes into the code - finally showing how an eventsourcing system is implemented.
Part IV builds a comprehensive Pattern Catalog and gives you quick guidance no how to implement typical scenarios in eventsourced systems.
Team Discounts
Get a team discount on this book!
Reader Testimonials
Gabriel N. Schenker
a roadmap to more predictable, maintainable, and successful software projects
This is not just another technical book—it’s a roadmap to more predictable, maintainable, and successful software projects. Martin Dilger has created an invaluable resource that I believe will influence how we approach software development for years to come.
Adam Dymitruk
By reading this book, you won’t just learn new techniques — you’ll transform the way you approach software development. You’ll gain clear, actionable steps to solve problems, communicate with unprecedented clarity, and estimate projects more accurately. In essence, you’ll be equipped to dismantle complexity and foster collaboration like never before.
Gary Craine
Focusing on a practical implementaion really worked for me. I appreciate the work you have done here.
Michael Plagge
Highly recommended reading
William Power
Thanks for writing the book, it will save me so much time and toil. I really like the Todo pattern to simplify the Saga. Also using an aggregate for uniqueness check is very nice.
Sebastian Bortz
The book is packed with knowledge and provides concrete example implementations. It advances the entire topic and makes it easier for developers to access. I can only recommend it.
Table of Contents
Part I - Foundations
- Foreword by Adam Dymitruk
- Foreword by Gabriel N. Schenker
- Why I care
- Foundations
- Why you should care
- Event Sourcing - what is it?
- Planning Systems using Event Modeling
- CQRS, Concurrency, (eventual) Consistency
- Internal versus external data
- The Anatomy of an event-sourced Application
- Event Streaming, Event Sourcing and Stream Design
- Domain Driven Design
- Sagas - Handling transactions in distributed systems
- Vertical Slicing
Part II - Modelling the System
- Modelling the System
- Brainstorming
- Modeling Use Cases with Wireframes
- "Given / When / Then" Scenarios
- Use Case: Clear Cart
- Use Case: Submit Cart
- Use Case: Inventory Changed
- Use Case: Price Changed
- Structuring an Event Model
Part III - From Zero to Running Software
- From Zero to Running Software
- Technology Stack
- Brief introduction to Axon
- Implementing the first slice - "Add Item"
- Implementing state view slices using Live-Projections
- Implementing Remove-Item and Clear-Cart
- Example Integration with Apache Kafka and Translations
- Implementing a database projection for inventories
- Implementing Automations
- Submitting the Cart
- Handling breaking changes
Part IV - Implementation Patterns
- Implementation Patterns
- What this part is about
- Pattern: Database Projected Read Model
- Pattern: Live Model
- Pattern: The (partially) synchronous Projection
- Pattern: The Logic Read Model
- Pattern: Snapshots
- Pattern: "Processor-TODO-List" - Pattern
- Pattern: The Reservation Pattern
- Where to go from here?
- Notes
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them