Most Python applications today follow a classic architecture where a data or domain model is implemented in terms of mutable data structures, be they relational database tables accessed via an object-relational mapper, or more free-form data stored in a graph or document store. Mutability implies the obliteration of historical state, and attempts to overcome this shortcoming often lead to overly complex models and applications.
Event sourced architectures take an alternative approach of storing all changes to a model in an append-only store as they occur. The stored history is immutable – bringing numerous scalability benefits – and contains sufficient information to reconstitute the model at any point in its history.
In this talk we show how to implement a simple persistent domain model in Python backed by event-sourced persistence without any need frameworks, ORMs or even a database!
Founder of Sixty North, an application, consulting and training business. Open source hacker and hobby technologist by night. Living and working in Oslo.
Sign in to add slides, notes or videos to this session