Training course

Advanced Event Sourcing, CQRS, and DDD Modelling

Advanced training course

In this advanced training you will learn how to model and implement complex systems using Domain-Driven Design, CQRS and Event Sourcing.

Course details

Level:
Advanced
Date(s):
8 - 9 Sep 2022
Time:
2022-09-08T08:00Z
Length:
16 hours over 2 days
Location:
Virtual classroom
Language:
English
Trainer:
Advanced training course

Advanced Event Sourcing, CQRS, and DDD Modelling

Event Sourcing is an implementation of a persistence model where instead of updating the current state of the system we persist its whole history as a stream of events. This approach gives us benefits such as a 100% reliable audit log, the ability to execute temporal queries, and replays that allow us to gain new insights from historical data or correct data inaccurately processed in the past.

In this advanced training course, you will gain the necessary experience on how to model and implement complex systems using Domain-Driven Design, CQRS, and Event Sourcing. It's an ideal follow-on from our 1-day Event Sourcing and CQRS Basics course.

Two technical patterns often used when implementing Event Sourcing are DDD and Command-Query Responsibility Segregation (CQRS). The CQRS architecture is a battle-tested approach used to design extremely high-scale systems by decoupling reads and writes. Modelling of a complex IT system is a task that presents many challenges - starting from business requirements, through working with many development teams and ending on nonfunctional ones related to availability and scalability. Domain-Driven Design is an approach that focuses on managing this complexity by aligning with the business domains to develop highly maintainable systems that deliver on business requirements.


Scope

This advanced training course is targeted at software developers & architects with an elementary understanding of Event Sourcing who are looking to gain the necessary experience on how to model and implement complex systems using Domain-Driven Design, CQRS and Event Sourcing. It will consist of 30% lecture and 70% hands-on coding and exercises. Please make sure you are aware of the prerequisites before any potential bookings.

DDD building blocks

  • Events
  • Aggregates
  • Commands
  • Value Objects
  • Entities
  • Services

Aggregate modelling

  • Design-level Event Storming / Event Modelling
  • Aggregate Design
  • Bounded Contexts
  • Private and Public Events

Aggregate implementation

  • Event Sourced Aggregates
  • Task-driven User Interfaces
  • Snapshotting
  • Testing using Given-When-Then formula
  • Correcting Events

CQRS & Event Sourcing

  • Event Sourced persistence Model
  • Read and Write stacks of CQRS
  • Benefits of Event Sourcing

Performance & scalability

  • Eventual consistency
  • Monitoring
  • Scaling
  • Partitioning
  • Event based context integration

Queries & projections

  • Projection design
  • Side-effect handling
  • Downtime-free Replays
  • Process Managers
  • Testing using Given-When-Then formula

Learning outcomes

  • Explore business domain and model it using Design-Level Event Storming and/or Event Modelling
  • Model a boundary of an Aggregate based on its business invariants and rules
  • Explain the impact of CQRS on Consistency, Availability and Scalability of the system
  • Implement Snapshotting of an Aggregate to reduce the time it takes to handle a Command
  • Unit test Aggregates and Projections using Given-When-Then formula
  • Evaluate event deduplication strategies
  • Implement and Replay Projections
  • Describe how to scale out an event consumer to meet business SLOs
  • Implement a Process Manager supported by a Projection

Prerequisites

  • Ideally completed our Event Sourcing and CQRS Basics course - if not, you should have an elementary understanding of Event Sourcing
  • Proficiency in either C# and Java (these are the languages we have our sample code in currently)
  • Laptop/notebook with a working development environment and ability to connect to the internet
  • A sample web application up and running (should be able to accept an HTTP connection)
  • Docker daemon up and running