Date post: | 22-Jun-2015 |
Category: |
Technology |
Upload: | andrea-magnorsky |
View: | 7,035 times |
Download: | 0 times |
CQRS/ES AND FRIENDS Possibly distributed systems... intentionally
WHY DO WE NEED YET ANOTHER SHINY?
Is this an Architecture? No: a bunch of patterns
Sorry I don’t cook
Less how should it be, more what should it do
WHY DDD IS RELEVANT
Ubiquitous language
Bounded contexts
Aggregates
If you are looking for intention, there is a way to
persist it
Legacy systems anyone?
IF
I WA
S T
RY
ING
TO
LE
AR
N C
QR
S N
OW
CQRS/ES
CQRS: “Separate command messages that
change state from query messages that read
state.”
Event Sourcing: Capture changes to an
application state as a sequence of events.
AND FRIENDS
Eventual Consistency
Messaging
QUERY
Query Side: asking a question should not change
the answer.
TASK BASED UIS
COMMAND
Tell the system what to do
Has a well defined intention
EVENT
Occurrence
If using messaging, possibility of integration.
CONSEQUENCE
Compensating actions -> there is no big eraser
here
Automatic audit log
Since there are no queries to read… the
aggregate roots have fewer relationship and their
boundaries are better defined
AN EXAMPLE
1. Add Item to cart
2. The product is not in stock
THANKS
Andrea Magnorsky
@silverspoon
www.roundcrisis.com
I wantz sleeps, its
Caturday