Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
A practical introduction
to Event Sourcing
and Command Query
Responsibility
Segregation
Robert Lemke
CEO Flownative

Project Founder Neos



robert@flownative.com

@robertlemke
CRUD
Create, Read, Update, Delete
CQRS
Command Query

Responsibility 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
Expressivity
Distributed /

event-driven architecture
Audit log*
Debugging
New representations / analysis
Easy storage
Commands
Do that! (imperative)
Command Handlers
will handle commands.
They don’t return a
result, only accept or
reject commands.
$commandHandler-
>handle($command);
Events
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.
The sample domain
addBookToAssortment
addBookToCatalog
addBookToListOfProductsPeopleCanBuy ;-)
Live Demo 😱
Some special cases
Deleting a book
Media / assets /
binary data
Flow accounts, …
Versioning events
Should you try it?
robert@flownative.com
www.flownative.com
@robertlemke
your thoughts?
A practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRS
Upcoming SlideShare
Loading in …5
×

A practical introduction to Event Sourcing and CQRS

623 views

Published on

Event Sourcing is supposed to be a great thing: silver bullet; at least. But only if your business case requires it. And if you event-source, you of course need CQRS. Unless you don't. After all, if it's business critical, you really want to use DDD.

Enough of the theory? How about some practical introduction to the world of commands, aggregates, events, projectors and process managers? After this session you'll surely have a better idea of what all of this is about.

https://www.youtube.com/watch?v=cUXi9fUqWQ0

Published in: Technology
  • Be the first to comment

A practical introduction to Event Sourcing and CQRS

  1. 1. A practical introduction to Event Sourcing and Command Query Responsibility Segregation
  2. 2. Robert Lemke CEO Flownative
 Project Founder Neos
 
 robert@flownative.com
 @robertlemke
  3. 3. CRUD Create, Read, Update, Delete
  4. 4. CQRS Command Query
 Responsibility Segragation
  5. 5. Event Sourcing Store all changes to the system, rather than it’s current state.
  6. 6. Event Sourcing Store all changes to the system, rather than it’s current state.
  7. 7. Mathias Verraes (http://verraes.net)
  8. 8. Motivation for Event Sourcing
  9. 9. Expressivity
  10. 10. Distributed /
 event-driven architecture
  11. 11. Audit log*
  12. 12. Debugging
  13. 13. New representations / analysis
  14. 14. Easy storage
  15. 15. Commands
  16. 16. Do that! (imperative)
  17. 17. Command Handlers will handle commands. They don’t return a result, only accept or reject commands.
  18. 18. $commandHandler- >handle($command);
  19. 19. Events
  20. 20. Domain Events: something interesting in the domain / business
  21. 21. (infrastructure) events: user clicked button, log has been rotated, file upload failed
  22. 22. Events are something which happened in the past
  23. 23. You can’t change the past, so events are immutable
  24. 24. Event Sourcing does not need a framework.
 But Neos.EventSourcing helps you implementing Event Sourcing with Flow.
  25. 25. The sample domain
  26. 26. addBookToAssortment addBookToCatalog addBookToListOfProductsPeopleCanBuy ;-)
  27. 27. Live Demo 😱
  28. 28. Some special cases
  29. 29. Deleting a book
  30. 30. Media / assets / binary data
  31. 31. Flow accounts, …
  32. 32. Versioning events
  33. 33. Should you try it?
  34. 34. robert@flownative.com www.flownative.com @robertlemke your thoughts?

×