SlideShare a Scribd company logo
1 of 16
Download to read offline
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 WAS TRYING   TO LEARN   CQRS NOW
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

More Related Content

Similar to Cqrs es and friends

Building a Distributed System, The Basics
Building a Distributed System, The BasicsBuilding a Distributed System, The Basics
Building a Distributed System, The Basics
Rich Beaudoin
 

Similar to Cqrs es and friends (10)

ans3ed-oddonly.pdf
ans3ed-oddonly.pdfans3ed-oddonly.pdf
ans3ed-oddonly.pdf
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptx
 
How Functional Programming Made Me A Better Developer
How Functional Programming Made Me A Better DeveloperHow Functional Programming Made Me A Better Developer
How Functional Programming Made Me A Better Developer
 
Event sourcing
Event sourcingEvent sourcing
Event sourcing
 
35 dbatune3
35 dbatune335 dbatune3
35 dbatune3
 
Simplify Your Life with CQRS
Simplify Your Life with CQRSSimplify Your Life with CQRS
Simplify Your Life with CQRS
 
Azure reactive systems
Azure reactive systemsAzure reactive systems
Azure reactive systems
 
Building a Distributed System, The Basics
Building a Distributed System, The BasicsBuilding a Distributed System, The Basics
Building a Distributed System, The Basics
 
Software Development Practices in Practice
Software Development Practices in PracticeSoftware Development Practices in Practice
Software Development Practices in Practice
 
CQRS and what it means for your architecture
CQRS and what it means for your architectureCQRS and what it means for your architecture
CQRS and what it means for your architecture
 

More from Andrea Magnorsky (6)

Bat cat
Bat catBat cat
Bat cat
 
Raven DB; day to day
Raven DB; day to dayRaven DB; day to day
Raven DB; day to day
 
Code retreat
Code retreatCode retreat
Code retreat
 
Open source and you
Open source and youOpen source and you
Open source and you
 
Developing Applications with Open Source frameworks in .NET
Developing Applications with Open Source frameworks in .NETDeveloping Applications with Open Source frameworks in .NET
Developing Applications with Open Source frameworks in .NET
 
jQuery
jQueryjQuery
jQuery
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Cqrs es and friends

  • 1. CQRS/ES AND FRIENDS Possibly distributed systems... intentionally
  • 2.
  • 3. 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
  • 4.
  • 5. 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?
  • 6. IF I WAS TRYING TO LEARN CQRS NOW
  • 7. 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.
  • 8. AND FRIENDS  Eventual Consistency  Messaging
  • 9. QUERY  Query Side: asking a question should not change the answer.
  • 11. COMMAND  Tell the system what to do  Has a well defined intention
  • 12. EVENT  Occurrence  If using messaging, possibility of integration.
  • 13.
  • 14. 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
  • 15. AN EXAMPLE 1. Add Item to cart 2. The product is not in stock
  • 16. THANKS  Andrea Magnorsky  @silverspoon  www.roundcrisis.com I wantz sleeps, its Caturday