A practical introduction to Event Sourcing and Command Query Responsibility Segregation
Robert Lemke
CEO FlownativeProject Founder [email protected]@robertlemke
CRUD
Create, Read, Update, Delete
CQRS
Command QueryResponsibility Segragation
Event Sourcing
Store all changes to the system, rather than it’s current state.
Event Sourcing
Store all changes to the system, rather than it’s current state.
Mathias Verraes (http://verraes.net)
Motivation for Event Sourcing
Distributed /event-driven architecture
New representations / analysis
Command Handlers will handle commands. They don’t return a result, only accept or reject commands.
$commandHandler->handle($command);
Domain Events: something interesting in the domain / business
(infrastructure) events: user clicked button, log has been rotated, file upload failed
Events are something which happened in the past
You can’t change the past, so events are immutable
Event Sourcing does not need a framework.
But Neos.EventSourcing helps you implementing Event Sourcing with Flow.
addBookToAssortment addBookToCatalog addBookToListOfProductsPeopleCanBuy ;-)
Media / assets / binary data
[email protected] www.flownative.com
@robertlemke
your thoughts?