Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Domain Driven Design with CQRS and Event Sourcing

Domain Driven Design with CQRS and Event Sourcing

Domain Driven Design, CQRS and Event Sourcing presentation made during Node.js Paris meetup (https://www.meetup.com/fr-FR/Nodejs-Paris/events/263358579/)

Sylvain PONTOREAU

January 08, 2020
Tweet

More Decks by Sylvain PONTOREAU

Other Decks in Programming

Transcript

  1. !=

  2. CQRS GetBalance Query Deposite Command GetAllOperation Query Withdraw Command …

    … Dispatcher Read DB Dispatcher QueryHandler CommandHandler Write DB Validation Plugin Monitoring Plugin Cache Plugin … ⚠ Eventual consistency
  3. • What is Event Sourcing? • Capture all domain changes

    as a sequence of events (stream) • Every changes in the domain are represented by events • Events are immutable • Event Store will be the single point of truth • Useful for: • Auditing • Debug • Fix inconsistency • Description of the pattern by Martin Fowler: https://martinfowler.com/eaaDev/EventSourcing.html Event Sourcing
  4. CQRS & Event Sourcing GetBalance Query Deposite Command GetAllOperation Query

    Withdraw Command … … Dispatcher Read DB Dispatcher QueryHandler CommandHandler Event Store Projection Projection Aggregate State Events Behaviors