Event Sourcing is perceived as a complex pattern. Some believe that it's like Nessie, everyone's heard about it, but rarely seen it. In fact, Event Sourcing is a pretty practical and straightforward concept. It helps build predictable applications closer to business. Nowadays, storage is cheap, and information is priceless. In Event Sourcing, no data is lost.
The workshop aims to build the knowledge of the general concept and its related patterns for the participants. The acquired knowledge will allow for the conscious design of architectural solutions and the analysis of associated risks.
The emphasis will be on a pragmatic understanding of architectures and applying it in practice using Marten and EventStoreDB.
- Introduction to Event-Driven Architectures. Differences from the classical approach are foundations and terminology (event, event streams, command, query).
- What is Event Sourcing, and how is it different from Event Streaming. Advantages and disadvantages.
- Write model, data consistency guarantees on examples from Marten and EventStoreDB.
- Various ways of handling business logic: Aggregates, Command Handlers, functional approach.
- Projections, best practices and concerns for building read models from events on the examples from Marten and EventStoreDB.
- Challenges in Event Sourcing and EDA: deliverability guarantees, sequence of event handling, idempotency, etc.
- Saga, Choreography, Process Manager, distributed processes in practice.
- Event Sourcing in the context of application architecture, integration with other approaches (CQRS, microservices, messaging, etc.).
- Good and bad practices in event modelling.
- Event Sourcing on production, evolution, events' schema versioning, etc.
You can do the workshop as a self-paced kit. That should give you a good foundation for starting your journey with Event Sourcing and learning tools like Marten and EventStoreDB. If you'd like to get full coverage with all nuances of the private workshop, feel free to contact me via email.
Read also more in my article Introduction to Event Sourcing - Self Paced Kit.
- Events definition.
- Getting State from events.
- Appending Events:
- Getting State from events
- Business logic:
- Application Logic:
- Optimistic Concurrency:
- Projections:
- Install git - https://git-scm.com/downloads.
- Clone this repository.
- Install .NET 8.0 - https://dotnet.microsoft.com/download/dotnet/8.0.
- Install Visual Studio, Rider or VSCode.
- Install docker - https://docs.docker.com/engine/install/.
- Open Exercises.sln solution.
- Run:
docker-compose up
. - Wait until all dockers got are downloaded and running.
- You should automatically get:
- Postgres DB running for Marten storage
- PG Admin - IDE for postgres. Available at: http://localhost:5050.
- Login:
admin@pgadmin.org
, Password:admin
- To connect to server click right mouse on Servers, then Register Server and use host:
postgres
, user:postgres
, password:Password12!
- Login:
- EventStoreDB UI: http://localhost:2113/
- Open, build and run Exercises.sln solution.
- To see solved exercises, open Solved.sln solution.