Skip to main content

Event Sourcing in production

Level:
advanced
Duration:
30 minutes

Abstract

Event Sourcing (ES) is a powerful concept that lets you adapt your business logic without losing data and past states. Whether your domain understanding changes or new requirements land on your lap, there is a path forward. Join us as we talk about some real-world tactics we relied on to manage Event Sourcing in production. We will accumulate a handful of patterns throughout the talk that will hopefully help you avoid pitfalls and bottlenecks.

Our use cases build on the eventsourcing library, a mature and well-rounded Python library that deserves more attention. We will tackle the three key aspects of a successful event-sourced application: evolution, projection, and runtime.

Software does not run in a vacuum, models need to change and evolve to reflect the world they live in. ES records the evolution of how we abstract our domain, how we see things. Eventually these abstractions can become clumsy or simply inappropriate. We can deal with that without breaking stride (losing data).

ES also gives us the ability to revisit our perspective and change how we present the application state — by creating new projections and replaying the history. We will look at how it offers a cheap way to support optimal read-models, which we can can tweak and rebuild in the blink of an eye.

Finally, we will present how such a system actually runs in a typical web application. Whether in the request loop (synchronous), or through eventual consistency (asynchronous). As a single process, or distributed for parallel processing.


This talk assumes some familiarity with Event Sourcing and its friends Domain Driven Design (DDD) and Command Query Responsibility Seggregation (CQRS).


The speaker

Borjan Tchakaloff

Borjan Tchakaloff

Borjan has been fully focusing his attention on software engineering with Python for the last six years. He is having good fun with event sourcing and Django. Currently busy at home with parental duties.