CQRS and Event Sourcing, An Alternative Architecture for DDD

Dennis Doomen
Dennis DoomenOn an everlasting quest for knowledge that significantly improves the way you build your key systems in an agile world.
CQRS & Event Sourcing,[object Object],An alternative architecture for DDD,[object Object],Dennis Doomen,[object Object]
The default architecture,[object Object],A better architecture,[object Object],The alternative architecture,[object Object],Advanced topics ,[object Object],Contents,[object Object]
The Default Architecture,[object Object],Easy to build,[object Object],Accepted by management,[object Object],Well known,[object Object],Lots of resources,[object Object],Lots of frameworks,[object Object],Silverlight Application,[object Object],No concurrency,[object Object],Scalability limited,[object Object],No domain verbs,[object Object],Granularity DTOs,[object Object],Unneccesary DTO conversions,[object Object],Conflicting demands,[object Object],Proxy,[object Object],DTOs,[object Object],Services,[object Object],Domain Services,[object Object],Domain Model,[object Object],Repositories,[object Object],Unit of Work,[object Object],Service Agents,[object Object],RelationalDatabase,[object Object],Backoffice Systems,[object Object]
CQRS,[object Object],Silverlight Application,[object Object],Commands are verbs,[object Object],No DTO conversion,[object Object],Easy to build disconnected clients,[object Object],Query Store = No SQL,[object Object],Very scalable,[object Object],Service Agent,[object Object],Queries,[object Object],Business Actions,[object Object],DTOs,[object Object],Commands,[object Object],Command Service,[object Object],Query Service,[object Object],Command Handlers,[object Object],Domain Services,[object Object],Domain Model,[object Object],Data Access Layer,[object Object],Repositories,[object Object],UoW,[object Object],Service Agents,[object Object],Difficult to sync database,[object Object],No concurrency,[object Object],Requires a task-based UI,[object Object],Complexity,[object Object],RelationalDatabase,[object Object],Query Store,[object Object],Backoffice Systems,[object Object],Changes,[object Object],Query Store,[object Object]
Task-based UIs a.k.a. Inductive UIs answer:,[object Object],What am I supposed to do now?,[object Object],Where do I go from here to accomplish my task?,[object Object],Task-based UIs,[object Object]
Focus screens on single task,[object Object],Make the task’s intention clear,[object Object],Offer links to secondary tasks,[object Object],Provide screens for starting tasks,[object Object],Make the next step obvious,[object Object],From Microsoft Inductive User Interface Guidelines,[object Object],Guidelines for Task-based UIs,[object Object]
Are valid or not, regardless of context,[object Object],Named in Ubiquitous Language,[object Object],State intent,[object Object],Can be asynchronous...,[object Object],...but beware of eventual consistency,[object Object],Rejection via exception or fault event,[object Object],Commands,[object Object]
One table per UI view,[object Object],Exposed through ,[object Object],SOA-style web services,[object Object],WCF data services,[object Object],WCF RIA Services,[object Object],Can be anything,[object Object],Relational Database,[object Object],No SQL database,[object Object],XML files,[object Object],Query Store,[object Object]
CQRS & Event Sourcing,[object Object],Silverlight Application,[object Object],Great performance,[object Object],Conflict Merging,[object Object],Historical Tracking,[object Object],Trival Synchronization,[object Object],Easy Integration,[object Object],Independent Query Store ,[object Object],Queries,[object Object],Service Agent,[object Object],Business Actions,[object Object],Commands,[object Object],DTOs,[object Object],Command Service,[object Object],Command Handlers,[object Object],Domain Services,[object Object],Domain Model,[object Object],Events,[object Object],Query Service,[object Object],Denormalizer,[object Object],Events,[object Object],Event Handlers,[object Object],Lots of new concepts,[object Object],Not so acceptable,[object Object],Few resources,[object Object],No consensus yet,[object Object],More complexity,[object Object],Aggregate boundaries important,[object Object],Data Access Layer,[object Object],UoW,[object Object],Event Bus,[object Object],Domain Repository,[object Object],Service Agents,[object Object],Query Store,[object Object],Event Store,[object Object],Query Store,[object Object],Backoffice Systems,[object Object],Events,[object Object]
Represent state changes in aggregate root,[object Object],Named in passed tense,[object Object],Using Ubiquitous Language,[object Object],Entire aggregate is stored in serialized format,[object Object],Events never change,[object Object],Snapshots to improve performance,[object Object],Events,[object Object]
Have no relationships (!),[object Object],Communicate through events,[object Object],Entities do not expose setters (!),[object Object],Apply events to themselves,[object Object],State exposed as mementos,[object Object],Aggregate Roots,[object Object]
Conflict Merging,[object Object]
Event Schema Versioning,[object Object],- Adds missing properties,[object Object],- Renames renamed properties,[object Object],- Converts values,[object Object],Post Converter,[object Object],Property Bag Converter,[object Object],Post Converter,[object Object],Post Converter,[object Object],id = 123,[object Object],SQL Server,[object Object],Domain Repository,[object Object],Event Store,[object Object],Property,[object Object],Bag,[object Object],Get(id = 123),[object Object],Event,[object Object],id = 123,[object Object]
Event Store != relational database...so no unique constraints,[object Object],Workarounds,[object Object],Check uniqueness through query side,[object Object],Add generic unique column to event store,[object Object],Introduce a parent that enforces uniqueness,[object Object],Unique Constraints,[object Object]
The CQRS Kitchen,[object Object],Views (XAML + C#),[object Object],View Models,[object Object],Application Services,[object Object],Unity,[object Object],Service Agent,[object Object],Commands,[object Object],DTOs,[object Object],Command Service,[object Object],Command Handlers,[object Object],WCF,[object Object],Domain Services,[object Object],Mementos,[object Object],Domain Model,[object Object],Unity,[object Object],Enterprise Library 5,[object Object],NCQRS++,[object Object],NSerivceBus,[object Object],Events,[object Object],Event Handlers,[object Object],Event Bus,[object Object],Domain Repository,[object Object],Events,[object Object],UoW,[object Object],Event Store,[object Object],Query Service,[object Object],Denormalizers,[object Object],WCF Data Services,[object Object],Thin Data Access Layer,[object Object],Entity Framework 4,[object Object],SQL Server,[object Object],Entity Framework 4,[object Object],SQL Server,[object Object]
NCQRS,[object Object],The CQRS framework for .NET http://ncqrs.codeplex.com/,[object Object],Very promising,[object Object],Great Documentation,[object Object],Quality code,[object Object],Uses Code Contracts,[object Object],Very active team,[object Object],I’m considering joining ,[object Object],(Still) difficult to get started,[object Object],Not proven yet,[object Object],Not complete yet,[object Object],Feels a bit too complex,[object Object],Not everything is pluggable,[object Object],Misses a coding standard,[object Object]
In summary,[object Object],Great for performance,[object Object],Very scalable,[object Object],Supports historical auditing,[object Object],Supports high concurrency,[object Object],Easy to integrate with other systems,[object Object],Very testable with TDD/DDD,[object Object],Aligns great with Ubiquitous Language,[object Object],Doesn’t require expensive RDBMS,[object Object],Lots of new concepts,[object Object],Lots of choices to make,[object Object],Not yet accepted by management,[object Object],Limited documentation,[object Object],No consensus yet,[object Object],More complexity,[object Object],Aggregate design is important,[object Object],I haven’t found all issues yet,[object Object]
Background InformationGreg Young, Mark Nijhof, Udi Dahan, Jonathan Oliver,[object Object],Example Code, FrameworksThe CQRS Kitchen, NCQRS,[object Object],Interaction Design / Task-Based UIsThe Inmates Are Running The Asylum, Alan CooperMicrosoft Inductive User Interface Guidelines,[object Object],Links,[object Object]
Emaildennis.doomen@avivasolutions.nl,[object Object],Twitter,[object Object],ddoomen,[object Object],Blogwww.dennisdoomen.net,[object Object],Questions?,[object Object]
1 of 19

Recommended

Event Sourcing & CQRS, Kafka, Rabbit MQ by
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQAraf Karsh Hamid
1.3K views104 slides
Building Event Driven (Micro)services with Apache Kafka by
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaGuido Schmutz
2.2K views48 slides
Domain Driven Design by
Domain Driven Design Domain Driven Design
Domain Driven Design Araf Karsh Hamid
1.4K views110 slides
Microservices Architecture - Cloud Native Apps by
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsAraf Karsh Hamid
1.4K views200 slides
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d... by
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...Kai Wähner
45.1K views51 slides
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu... by
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Edureka!
2K views39 slides

More Related Content

What's hot

Microservices Architecture Part 2 Event Sourcing and Saga by
Microservices Architecture Part 2 Event Sourcing and SagaMicroservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaAraf Karsh Hamid
9.1K views58 slides
Event Storming and Saga by
Event Storming and SagaEvent Storming and Saga
Event Storming and SagaAraf Karsh Hamid
5.8K views58 slides
Scaling Microservices with Kubernetes by
Scaling Microservices with KubernetesScaling Microservices with Kubernetes
Scaling Microservices with KubernetesDeivid Hahn Fração
983 views68 slides
SRV308 Deep Dive on Amazon Aurora by
SRV308 Deep Dive on Amazon AuroraSRV308 Deep Dive on Amazon Aurora
SRV308 Deep Dive on Amazon AuroraAmazon Web Services
3.2K views55 slides
Developing event-driven microservices with event sourcing and CQRS (svcc, sv... by
Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...Chris Richardson
55.2K views92 slides
Micro services Architecture by
Micro services ArchitectureMicro services Architecture
Micro services ArchitectureAraf Karsh Hamid
3.1K views49 slides

What's hot(20)

Microservices Architecture Part 2 Event Sourcing and Saga by Araf Karsh Hamid
Microservices Architecture Part 2 Event Sourcing and SagaMicroservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and Saga
Araf Karsh Hamid9.1K views
Developing event-driven microservices with event sourcing and CQRS (svcc, sv... by Chris Richardson
Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...
Chris Richardson55.2K views
Kafka as an event store - is it good enough? by Guido Schmutz
Kafka as an event store - is it good enough?Kafka as an event store - is it good enough?
Kafka as an event store - is it good enough?
Guido Schmutz2.3K views
Microservices Part 3 Service Mesh and Kafka by Araf Karsh Hamid
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and Kafka
Araf Karsh Hamid7.6K views
Dapr: distributed application runtime by Moaid Hathot
Dapr: distributed application runtimeDapr: distributed application runtime
Dapr: distributed application runtime
Moaid Hathot310 views
A Reference Architecture for ETL 2.0 by DataWorks Summit
A Reference Architecture for ETL 2.0 A Reference Architecture for ETL 2.0
A Reference Architecture for ETL 2.0
DataWorks Summit21.5K views
CQRS and Event Sourcing by Inho Kang
CQRS and Event Sourcing CQRS and Event Sourcing
CQRS and Event Sourcing
Inho Kang1.4K views
Apache Kafka® and the Data Mesh by ConfluentInc1
Apache Kafka® and the Data MeshApache Kafka® and the Data Mesh
Apache Kafka® and the Data Mesh
ConfluentInc1188 views
Introducing MongoDB Atlas by MongoDB
Introducing MongoDB AtlasIntroducing MongoDB Atlas
Introducing MongoDB Atlas
MongoDB2.3K views
(BDT318) How Netflix Handles Up To 8 Million Events Per Second by Amazon Web Services
(BDT318) How Netflix Handles Up To 8 Million Events Per Second(BDT318) How Netflix Handles Up To 8 Million Events Per Second
(BDT318) How Netflix Handles Up To 8 Million Events Per Second
Amazon Web Services79.1K views
Saturn 2018: Managing data consistency in a microservice architecture using S... by Chris Richardson
Saturn 2018: Managing data consistency in a microservice architecture using S...Saturn 2018: Managing data consistency in a microservice architecture using S...
Saturn 2018: Managing data consistency in a microservice architecture using S...
Chris Richardson107.8K views
YOW2018 - Events and Commands: Developing Asynchronous Microservices by Chris Richardson
YOW2018 - Events and Commands: Developing Asynchronous MicroservicesYOW2018 - Events and Commands: Developing Asynchronous Microservices
YOW2018 - Events and Commands: Developing Asynchronous Microservices
Chris Richardson3K views
Introduction to Event-Driven Architecture by Solace
Introduction to Event-Driven Architecture Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture
Solace1.7K views

Viewers also liked

CQRS and Event Sourcing with Akka, Cassandra and RabbitMQ by
CQRS and Event Sourcing with Akka, Cassandra and RabbitMQCQRS and Event Sourcing with Akka, Cassandra and RabbitMQ
CQRS and Event Sourcing with Akka, Cassandra and RabbitMQMiel Donkers
7.9K views29 slides
A year with event sourcing and CQRS by
A year with event sourcing and CQRSA year with event sourcing and CQRS
A year with event sourcing and CQRSSteve Pember
4.6K views149 slides
CQRS & event sourcing in the wild by
CQRS & event sourcing in the wildCQRS & event sourcing in the wild
CQRS & event sourcing in the wildMichiel Rook
4K views54 slides
From ActiveRecord to EventSourcing by
From ActiveRecord to EventSourcingFrom ActiveRecord to EventSourcing
From ActiveRecord to EventSourcingEmanuele DelBono
11.1K views44 slides
CQRS & Event Sourcing in the wild (ScotlandPHP 2016) by
CQRS & Event Sourcing in the wild (ScotlandPHP 2016)CQRS & Event Sourcing in the wild (ScotlandPHP 2016)
CQRS & Event Sourcing in the wild (ScotlandPHP 2016)Michiel Rook
1.4K views56 slides
Microservice Architecture with CQRS and Event Sourcing by
Microservice Architecture with CQRS and Event SourcingMicroservice Architecture with CQRS and Event Sourcing
Microservice Architecture with CQRS and Event SourcingBen Wilcock
8K views11 slides

Viewers also liked(8)

CQRS and Event Sourcing with Akka, Cassandra and RabbitMQ by Miel Donkers
CQRS and Event Sourcing with Akka, Cassandra and RabbitMQCQRS and Event Sourcing with Akka, Cassandra and RabbitMQ
CQRS and Event Sourcing with Akka, Cassandra and RabbitMQ
Miel Donkers7.9K views
A year with event sourcing and CQRS by Steve Pember
A year with event sourcing and CQRSA year with event sourcing and CQRS
A year with event sourcing and CQRS
Steve Pember4.6K views
CQRS & event sourcing in the wild by Michiel Rook
CQRS & event sourcing in the wildCQRS & event sourcing in the wild
CQRS & event sourcing in the wild
Michiel Rook4K views
From ActiveRecord to EventSourcing by Emanuele DelBono
From ActiveRecord to EventSourcingFrom ActiveRecord to EventSourcing
From ActiveRecord to EventSourcing
Emanuele DelBono11.1K views
CQRS & Event Sourcing in the wild (ScotlandPHP 2016) by Michiel Rook
CQRS & Event Sourcing in the wild (ScotlandPHP 2016)CQRS & Event Sourcing in the wild (ScotlandPHP 2016)
CQRS & Event Sourcing in the wild (ScotlandPHP 2016)
Michiel Rook1.4K views
Microservice Architecture with CQRS and Event Sourcing by Ben Wilcock
Microservice Architecture with CQRS and Event SourcingMicroservice Architecture with CQRS and Event Sourcing
Microservice Architecture with CQRS and Event Sourcing
Ben Wilcock8K views
CQRS and Event Sourcing for Java Developers by Markus Eisele
CQRS and Event Sourcing for Java DevelopersCQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java Developers
Markus Eisele16.3K views
codecentric AG: CQRS and Event Sourcing Applications with Cassandra by DataStax Academy
codecentric AG: CQRS and Event Sourcing Applications with Cassandracodecentric AG: CQRS and Event Sourcing Applications with Cassandra
codecentric AG: CQRS and Event Sourcing Applications with Cassandra
DataStax Academy14.8K views

Similar to CQRS and Event Sourcing, An Alternative Architecture for DDD

Windows Azure for .NET Developers by
Windows Azure for .NET DevelopersWindows Azure for .NET Developers
Windows Azure for .NET Developersllangit
630 views44 slides
Roles y Responsabilidades en SQL Azure by
Roles y Responsabilidades en SQL AzureRoles y Responsabilidades en SQL Azure
Roles y Responsabilidades en SQL AzureEduardo Castro
2.4K views30 slides
Cqrs and event sourcing in azure by
Cqrs and event sourcing in azureCqrs and event sourcing in azure
Cqrs and event sourcing in azureSergey Seletsky
2.4K views32 slides
Silverlight 4 Reference Architecture for LOB apps by
Silverlight 4 Reference Architecture for LOB appsSilverlight 4 Reference Architecture for LOB apps
Silverlight 4 Reference Architecture for LOB appsDennis Doomen
1.1K views17 slides
Architectural Refactoring by
Architectural RefactoringArchitectural Refactoring
Architectural RefactoringDavid Adsit
1.2K views30 slides
Shaping serverless architecture with domain driven design patterns by
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShimon Tolts
250 views26 slides

Similar to CQRS and Event Sourcing, An Alternative Architecture for DDD(20)

Windows Azure for .NET Developers by llangit
Windows Azure for .NET DevelopersWindows Azure for .NET Developers
Windows Azure for .NET Developers
llangit630 views
Roles y Responsabilidades en SQL Azure by Eduardo Castro
Roles y Responsabilidades en SQL AzureRoles y Responsabilidades en SQL Azure
Roles y Responsabilidades en SQL Azure
Eduardo Castro2.4K views
Cqrs and event sourcing in azure by Sergey Seletsky
Cqrs and event sourcing in azureCqrs and event sourcing in azure
Cqrs and event sourcing in azure
Sergey Seletsky2.4K views
Silverlight 4 Reference Architecture for LOB apps by Dennis Doomen
Silverlight 4 Reference Architecture for LOB appsSilverlight 4 Reference Architecture for LOB apps
Silverlight 4 Reference Architecture for LOB apps
Dennis Doomen1.1K views
Architectural Refactoring by David Adsit
Architectural RefactoringArchitectural Refactoring
Architectural Refactoring
David Adsit1.2K views
Shaping serverless architecture with domain driven design patterns by Shimon Tolts
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patterns
Shimon Tolts250 views
Shaping serverless architecture with domain driven design patterns by Asher Sterkin
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patterns
Asher Sterkin3K views
Day Of Cloud - Windows Azure Platform by Wade Wegner
Day Of Cloud - Windows Azure PlatformDay Of Cloud - Windows Azure Platform
Day Of Cloud - Windows Azure Platform
Wade Wegner461 views
Introduction To Sql Services by llangit
Introduction To Sql ServicesIntroduction To Sql Services
Introduction To Sql Services
llangit653 views
Crafted Design - LJC World Tour Mash Up 2014 by Sandro Mancuso
Crafted Design - LJC World Tour Mash Up 2014Crafted Design - LJC World Tour Mash Up 2014
Crafted Design - LJC World Tour Mash Up 2014
Sandro Mancuso4.9K views
Introducing SQL Server Data Services by goodfriday
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Services
goodfriday143 views
Introducing SQL Server Data Services by goodfriday
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Services
goodfriday985 views
Dennis Doomen. Using OWIN, Webhooks, Event Sourcing and the Onion Architectur... by IT Arena
Dennis Doomen. Using OWIN, Webhooks, Event Sourcing and the Onion Architectur...Dennis Doomen. Using OWIN, Webhooks, Event Sourcing and the Onion Architectur...
Dennis Doomen. Using OWIN, Webhooks, Event Sourcing and the Onion Architectur...
IT Arena297 views
SQL Azure the database in the cloud by Eduardo Castro
SQL Azure the database in the cloud SQL Azure the database in the cloud
SQL Azure the database in the cloud
Eduardo Castro916 views
Microsoft SQL Azure - Building Applications Using SQL Azure Presentation by Microsoft Private Cloud
Microsoft SQL Azure - Building Applications Using SQL Azure PresentationMicrosoft SQL Azure - Building Applications Using SQL Azure Presentation
Microsoft SQL Azure - Building Applications Using SQL Azure Presentation
Chalk and Talk: Silverlight, WCF RIA Services, Architectuur by Dennis Doomen
Chalk and Talk: Silverlight, WCF RIA Services, ArchitectuurChalk and Talk: Silverlight, WCF RIA Services, Architectuur
Chalk and Talk: Silverlight, WCF RIA Services, Architectuur
Dennis Doomen1K views
The web as it should be by thebeebs
The web as it should beThe web as it should be
The web as it should be
thebeebs865 views
Windows Azure by John Alioto
Windows AzureWindows Azure
Windows Azure
John Alioto1.1K views

More from Dennis Doomen

Getting a grip on your code dependencies (2023-10) by
Getting a grip on your code dependencies (2023-10)Getting a grip on your code dependencies (2023-10)
Getting a grip on your code dependencies (2023-10)Dennis Doomen
23 views38 slides
Tools and practices to help you deal with legacy code by
Tools and practices to help you deal with legacy codeTools and practices to help you deal with legacy code
Tools and practices to help you deal with legacy codeDennis Doomen
20 views58 slides
What you can learn from an open-source project with 250 million downloads by
What you can learn from an open-source project with 250 million downloadsWhat you can learn from an open-source project with 250 million downloads
What you can learn from an open-source project with 250 million downloadsDennis Doomen
103 views52 slides
Getting a grip on your code dependencies by
Getting a grip on your code dependenciesGetting a grip on your code dependencies
Getting a grip on your code dependenciesDennis Doomen
92 views38 slides
My Laws of Test Driven Development (2023) by
My Laws of Test Driven Development (2023)My Laws of Test Driven Development (2023)
My Laws of Test Driven Development (2023)Dennis Doomen
124 views38 slides
Automate Infrastructure with Pulumi and C# by
Automate Infrastructure with Pulumi and C#Automate Infrastructure with Pulumi and C#
Automate Infrastructure with Pulumi and C#Dennis Doomen
58 views9 slides

More from Dennis Doomen(20)

Getting a grip on your code dependencies (2023-10) by Dennis Doomen
Getting a grip on your code dependencies (2023-10)Getting a grip on your code dependencies (2023-10)
Getting a grip on your code dependencies (2023-10)
Dennis Doomen23 views
Tools and practices to help you deal with legacy code by Dennis Doomen
Tools and practices to help you deal with legacy codeTools and practices to help you deal with legacy code
Tools and practices to help you deal with legacy code
Dennis Doomen20 views
What you can learn from an open-source project with 250 million downloads by Dennis Doomen
What you can learn from an open-source project with 250 million downloadsWhat you can learn from an open-source project with 250 million downloads
What you can learn from an open-source project with 250 million downloads
Dennis Doomen103 views
Getting a grip on your code dependencies by Dennis Doomen
Getting a grip on your code dependenciesGetting a grip on your code dependencies
Getting a grip on your code dependencies
Dennis Doomen92 views
My Laws of Test Driven Development (2023) by Dennis Doomen
My Laws of Test Driven Development (2023)My Laws of Test Driven Development (2023)
My Laws of Test Driven Development (2023)
Dennis Doomen124 views
Automate Infrastructure with Pulumi and C# by Dennis Doomen
Automate Infrastructure with Pulumi and C#Automate Infrastructure with Pulumi and C#
Automate Infrastructure with Pulumi and C#
Dennis Doomen58 views
Slow Event Sourcing (re)projections - Just make them faster! by Dennis Doomen
Slow Event Sourcing (re)projections - Just make them faster!Slow Event Sourcing (re)projections - Just make them faster!
Slow Event Sourcing (re)projections - Just make them faster!
Dennis Doomen123 views
50 things software teams should not do.pptx by Dennis Doomen
50 things software teams should not do.pptx50 things software teams should not do.pptx
50 things software teams should not do.pptx
Dennis Doomen18 views
What is the right "unit" in unit testing and why it is not a class? by Dennis Doomen
What is the right "unit" in unit testing and why it is not a class?What is the right "unit" in unit testing and why it is not a class?
What is the right "unit" in unit testing and why it is not a class?
Dennis Doomen157 views
How to Practice TDD Without Shooting Yourself in the Foot by Dennis Doomen
How to Practice TDD Without Shooting Yourself in the FootHow to Practice TDD Without Shooting Yourself in the Foot
How to Practice TDD Without Shooting Yourself in the Foot
Dennis Doomen214 views
Decomposing the Monolith using modern-day .NET and a touch of microservices by Dennis Doomen
Decomposing the Monolith using modern-day .NET and a touch of microservicesDecomposing the Monolith using modern-day .NET and a touch of microservices
Decomposing the Monolith using modern-day .NET and a touch of microservices
Dennis Doomen365 views
Event Sourcing from the Trenches (DDD Europe 2020) by Dennis Doomen
Event Sourcing from the Trenches (DDD Europe 2020)Event Sourcing from the Trenches (DDD Europe 2020)
Event Sourcing from the Trenches (DDD Europe 2020)
Dennis Doomen848 views
Practical introduction to DDD, CQRS and Event Sourcing by Dennis Doomen
Practical introduction to DDD, CQRS and Event SourcingPractical introduction to DDD, CQRS and Event Sourcing
Practical introduction to DDD, CQRS and Event Sourcing
Dennis Doomen1.2K views
How to practice TDD without shooting yourself in the foot by Dennis Doomen
How to practice TDD without shooting yourself in the footHow to practice TDD without shooting yourself in the foot
How to practice TDD without shooting yourself in the foot
Dennis Doomen357 views
Decomposing the Monolith (Riga Dev Days 2019) by Dennis Doomen
Decomposing the Monolith (Riga Dev Days 2019)Decomposing the Monolith (Riga Dev Days 2019)
Decomposing the Monolith (Riga Dev Days 2019)
Dennis Doomen441 views
A lab around the principles and practices for writing maintainable code (2019) by Dennis Doomen
A lab around the principles and practices for writing maintainable code (2019)A lab around the principles and practices for writing maintainable code (2019)
A lab around the principles and practices for writing maintainable code (2019)
Dennis Doomen468 views
Lessons learned from two decades of professional software development by Dennis Doomen
Lessons learned from two decades of professional software developmentLessons learned from two decades of professional software development
Lessons learned from two decades of professional software development
Dennis Doomen669 views
The Good, The Bad and The Ugly of Event Sourcing by Dennis Doomen
The Good, The Bad and The Ugly of Event Sourcing The Good, The Bad and The Ugly of Event Sourcing
The Good, The Bad and The Ugly of Event Sourcing
Dennis Doomen1.9K views
Event Sourcing from the Trenches (with examples from .NET) by Dennis Doomen
Event Sourcing from the Trenches (with examples from .NET)Event Sourcing from the Trenches (with examples from .NET)
Event Sourcing from the Trenches (with examples from .NET)
Dennis Doomen1.1K views
How To Practice TDD Without Shooting Yourself In The Foot by Dennis Doomen
How To Practice TDD Without Shooting Yourself In The FootHow To Practice TDD Without Shooting Yourself In The Foot
How To Practice TDD Without Shooting Yourself In The Foot
Dennis Doomen366 views

Recently uploaded

GDSC CTU First Meeting Party by
GDSC CTU First Meeting PartyGDSC CTU First Meeting Party
GDSC CTU First Meeting PartyNational Yang Ming Chiao Tung University
11 views25 slides
PharoJS - Zürich Smalltalk Group Meetup November 2023 by
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023Noury Bouraqadi
139 views17 slides
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensorssugiuralab
23 views15 slides
PRODUCT LISTING.pptx by
PRODUCT LISTING.pptxPRODUCT LISTING.pptx
PRODUCT LISTING.pptxangelicacueva6
18 views1 slide
Vertical User Stories by
Vertical User StoriesVertical User Stories
Vertical User StoriesMoisés Armani Ramírez
17 views16 slides
Evolving the Network Automation Journey from Python to Platforms by
Evolving the Network Automation Journey from Python to PlatformsEvolving the Network Automation Journey from Python to Platforms
Evolving the Network Automation Journey from Python to PlatformsNetwork Automation Forum
17 views21 slides

Recently uploaded(20)

PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi139 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab23 views
The Forbidden VPN Secrets.pdf by Mariam Shaba
The Forbidden VPN Secrets.pdfThe Forbidden VPN Secrets.pdf
The Forbidden VPN Secrets.pdf
Mariam Shaba20 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn26 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software317 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty22 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10345 views

CQRS and Event Sourcing, An Alternative Architecture for DDD

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.

Editor's Notes

  1. DisadvantagesNo concurrency; conflicting service requests are simply rejectedStaleness ignored;Scalability limited; No domain verbs; domain model does contain concepts from the domain model, just not the business actionsGranularity DTOs; What operations to expose in your WCF service? What relations to include and when? What domain entities to flatten.Unneccesary DTO conversions; Conversions from/to domain model entities, traversing of relations, eager fatchingConflicting demands; query demands denormalized schema, commands require normalized integer schema
  2. DisadvantagesNo concurrency; conflicting service requests are simply rejectedStaleness ignored;Scalability limited; No domain verbs; domain model does contain concepts from the domain model, just not the business actionsGranularity DTOs; What operations to expose in your WCF service? What relations to include and when? What domain entities to flatten.Unneccesary DTO conversions; Conversions from/to domain model entities, traversing of relations, eager fatchingConflicting demands; query demands denormalized schema, commands require normalized integer schema
  3. Commands validate itself without using any context, thus is valid or not instead of sometimes.Commands are named in the Ubiquitous LanguageCommands can be send asynchronously, and thus can be resistent to database unavailabilityMogelijk meerdere commands met dezeflde state change: CorrectCustomerAddress, MoveCustomerCommand interfaces: in-memory, WCF, WCF RIA Services, NServiceBus, etc
  4. DisadvantagesNo concurrency; conflicting service requests are simply rejectedStaleness ignored;Scalability limited; No domain verbs; domain model does contain concepts from the domain model, just not the business actionsGranularity DTOs; What operations to expose in your WCF service? What relations to include and when? What domain entities to flatten.Unneccesary DTO conversions; Conversions from/to domain model entities, traversing of relations, eager fatchingConflicting demands; query demands denormalized schema, commands require normalized integer schema
  5. DisadvantagesNo concurrency; conflicting service requests are simply rejectedStaleness ignored;Scalability limited; No domain verbs; domain model does contain concepts from the domain model, just not the business actionsGranularity DTOs; What operations to expose in your WCF service? What relations to include and when? What domain entities to flatten.Unneccesary DTO conversions; Conversions from/to domain model entities, traversing of relations, eager fatchingConflicting demands; query demands denormalized schema, commands require normalized integer schema