SlideShare uma empresa Scribd logo
1 de 19
CQRS +
EVENT SOURCING

Design to
build a bullet
proof
architecture
we are

Expertise
Quality
Respect

/studio
Agile

Big Data custom

CQRS Desktop Event
Sourcing Microsoft .NET C#
Scrum Software
development Training
© Pyxis Technologies inc.

Web
SPLIT COMMAND AND REQUEST

© Pyxis Technologies inc.

3
TRADITIONAL SYSTEM
Relational
database
Data updates

Business logic

CRUD

User interface
© Pyxis Technologies inc.

4
PROBLEMS

© Pyxis Technologies inc.

5
WHY ARE WE STILL DOING THIS?

© Pyxis Technologies inc.

7
WHY ARE WE STILL DOING THIS?

© Pyxis Technologies inc.

8
LEAP OF FAITH…

© Pyxis Technologies inc.

10
SPLIT COMMAND AND QUERY
TRADITIONAL SYSTEM
Relational
database
Data updates

Business logic

Commands

Requests

User interface
© Pyxis Technologies inc.

11
CQRS -

C O M M A N D A N D Q U E R Y R E S P O N S I B I L I T Y S E G R E G AT I O N

Relational
database
Data updates
Domain

Read model

Command
handlers

Requests

Commands
User interface
© Pyxis Technologies inc.

12
CALL TO ACTION
 Use verbs instead of nouns
 Ask yourself how the user will use your system
 Talk in domain language

 No simple data editing, more domain actions
 Submit commands
 Serializable message
 Imperative mode
 Well defined language

 Can a command be refused?

© Pyxis Technologies inc.

13
CQRS
 Commands
 Change system state
 Asynchronous (for better or worst)

 Requests







No system state change
Denormalized model
Distributable (Charding)
Scalable
At least 90% of system access
Performance

© Pyxis Technologies inc.

14
ARE WE THERE YET?

© Pyxis Technologies inc.

15
CQRS -

C O M M A N D A N D Q U E R Y R E S P O N S I B I L I T Y S E G R E G AT I O N

Relational
database
Data updates
Domain

Read model

Command
handlers

Requests

Commands
User interface
© Pyxis Technologies inc.

16
CQRS + EVENT SOURCING

Events

Denormalizer

Event Store

Event handlers

Service BUS

XML

SQL

Domain

HTML

Read model

Command
handlers

Requests

Commands
User interface
© Pyxis Technologies inc.

17
EVENT SOURCING







Model based on behavior not structure
Sequential and cumulative
Events can be played back
Append only
Any data structure can be built from events
Audit

© Pyxis Technologies inc.

18
EVENTS
 Rolling Snapshot
 Optimization

 Aggregate root
 Transaction scope
 Built from events
 Commands
 ApplyEvent

 Events
 Can’t fail
 No business logic

© Pyxis Technologies inc.

19
CQRS PIPELINE

Event store

User interface

Commands

© Pyxis Technologies inc.

Domain changes

Events

Denormalizer

Read models

20
THE END
 Remember
 Events are the only truth
 Domain is the heart of the system
 Read models are flexible and volatile

 Questions?
 Eric De Carufel
 eric@decarufel.net
 http://blog.decarufel.net
 http://pyxis-tech.com

© Pyxis Technologies inc.

21

Mais conteúdo relacionado

Mais procurados

CQRS + Event Sourcing
CQRS + Event SourcingCQRS + Event Sourcing
CQRS + Event SourcingMike Bild
 
Going Serverless with CQRS on AWS
Going Serverless with CQRS on AWSGoing Serverless with CQRS on AWS
Going Serverless with CQRS on AWSAnton Udovychenko
 
Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...
Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...
Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...confluent
 
Event Sourcing with Microservices
Event Sourcing with MicroservicesEvent Sourcing with Microservices
Event Sourcing with MicroservicesRalph Winzinger
 
Event Sourcing in less than 20 minutes - With Akka and Java 8
Event Sourcing in less than 20 minutes - With Akka and Java 8Event Sourcing in less than 20 minutes - With Akka and Java 8
Event Sourcing in less than 20 minutes - With Akka and Java 8J On The Beach
 
Microservice Architecture with CQRS and Event Sourcing
Microservice Architecture with CQRS and Event SourcingMicroservice Architecture with CQRS and Event Sourcing
Microservice Architecture with CQRS and Event SourcingBen Wilcock
 
How to write your database: the story about Event Store
How to write your database: the story about Event StoreHow to write your database: the story about Event Store
How to write your database: the story about Event StoreVictor Haydin
 
Modernising Change - Lime Point - Confluent - Kong
Modernising Change - Lime Point - Confluent - KongModernising Change - Lime Point - Confluent - Kong
Modernising Change - Lime Point - Confluent - Kongconfluent
 
Bank of China (HK) Tech Talk 1: Dive Into Apache Kafka
Bank of China (HK) Tech Talk 1: Dive Into Apache KafkaBank of China (HK) Tech Talk 1: Dive Into Apache Kafka
Bank of China (HK) Tech Talk 1: Dive Into Apache Kafkaconfluent
 
Building and deploying microservices with event sourcing, CQRS and Docker (QC...
Building and deploying microservices with event sourcing, CQRS and Docker (QC...Building and deploying microservices with event sourcing, CQRS and Docker (QC...
Building and deploying microservices with event sourcing, CQRS and Docker (QC...Chris Richardson
 
20160317 lagom sf scala
20160317 lagom sf scala20160317 lagom sf scala
20160317 lagom sf scalashinolajla
 
Cqrs and event sourcing in azure
Cqrs and event sourcing in azureCqrs and event sourcing in azure
Cqrs and event sourcing in azureSergey Seletsky
 
Extracting Value from IOT using Azure Cosmos DB, Azure Synapse Analytics and ...
Extracting Value from IOT using Azure Cosmos DB, Azure Synapse Analytics and ...Extracting Value from IOT using Azure Cosmos DB, Azure Synapse Analytics and ...
Extracting Value from IOT using Azure Cosmos DB, Azure Synapse Analytics and ...HostedbyConfluent
 
Use Apache Gradle to Build and Automate KSQL and Kafka Streams (Stewart Bryso...
Use Apache Gradle to Build and Automate KSQL and Kafka Streams (Stewart Bryso...Use Apache Gradle to Build and Automate KSQL and Kafka Streams (Stewart Bryso...
Use Apache Gradle to Build and Automate KSQL and Kafka Streams (Stewart Bryso...confluent
 
Go Serverless with Azure
Go Serverless with AzureGo Serverless with Azure
Go Serverless with AzureSergey Seletsky
 
The database is half done
The database is half doneThe database is half done
The database is half doneconfluent
 

Mais procurados (20)

CQRS + Event Sourcing
CQRS + Event SourcingCQRS + Event Sourcing
CQRS + Event Sourcing
 
Going Serverless with CQRS on AWS
Going Serverless with CQRS on AWSGoing Serverless with CQRS on AWS
Going Serverless with CQRS on AWS
 
Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...
Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...
Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...
 
Event Sourcing with Microservices
Event Sourcing with MicroservicesEvent Sourcing with Microservices
Event Sourcing with Microservices
 
Event Sourcing in less than 20 minutes - With Akka and Java 8
Event Sourcing in less than 20 minutes - With Akka and Java 8Event Sourcing in less than 20 minutes - With Akka and Java 8
Event Sourcing in less than 20 minutes - With Akka and Java 8
 
Microservice Architecture with CQRS and Event Sourcing
Microservice Architecture with CQRS and Event SourcingMicroservice Architecture with CQRS and Event Sourcing
Microservice Architecture with CQRS and Event Sourcing
 
Core Banking System on Apache Kafka
Core Banking System on Apache KafkaCore Banking System on Apache Kafka
Core Banking System on Apache Kafka
 
How to write your database: the story about Event Store
How to write your database: the story about Event StoreHow to write your database: the story about Event Store
How to write your database: the story about Event Store
 
Modernising Change - Lime Point - Confluent - Kong
Modernising Change - Lime Point - Confluent - KongModernising Change - Lime Point - Confluent - Kong
Modernising Change - Lime Point - Confluent - Kong
 
Bank of China (HK) Tech Talk 1: Dive Into Apache Kafka
Bank of China (HK) Tech Talk 1: Dive Into Apache KafkaBank of China (HK) Tech Talk 1: Dive Into Apache Kafka
Bank of China (HK) Tech Talk 1: Dive Into Apache Kafka
 
Building and deploying microservices with event sourcing, CQRS and Docker (QC...
Building and deploying microservices with event sourcing, CQRS and Docker (QC...Building and deploying microservices with event sourcing, CQRS and Docker (QC...
Building and deploying microservices with event sourcing, CQRS and Docker (QC...
 
20160317 lagom sf scala
20160317 lagom sf scala20160317 lagom sf scala
20160317 lagom sf scala
 
Cqrs and event sourcing in azure
Cqrs and event sourcing in azureCqrs and event sourcing in azure
Cqrs and event sourcing in azure
 
Domain Event - The Hidden Gem of DDD
Domain Event - The Hidden Gem of DDDDomain Event - The Hidden Gem of DDD
Domain Event - The Hidden Gem of DDD
 
Extracting Value from IOT using Azure Cosmos DB, Azure Synapse Analytics and ...
Extracting Value from IOT using Azure Cosmos DB, Azure Synapse Analytics and ...Extracting Value from IOT using Azure Cosmos DB, Azure Synapse Analytics and ...
Extracting Value from IOT using Azure Cosmos DB, Azure Synapse Analytics and ...
 
Use Apache Gradle to Build and Automate KSQL and Kafka Streams (Stewart Bryso...
Use Apache Gradle to Build and Automate KSQL and Kafka Streams (Stewart Bryso...Use Apache Gradle to Build and Automate KSQL and Kafka Streams (Stewart Bryso...
Use Apache Gradle to Build and Automate KSQL and Kafka Streams (Stewart Bryso...
 
Go Serverless with Azure
Go Serverless with AzureGo Serverless with Azure
Go Serverless with Azure
 
CQRS & EVS with MongoDb
CQRS & EVS with MongoDbCQRS & EVS with MongoDb
CQRS & EVS with MongoDb
 
CQRS and Event Sourcing
CQRS and Event SourcingCQRS and Event Sourcing
CQRS and Event Sourcing
 
The database is half done
The database is half doneThe database is half done
The database is half done
 

Semelhante a Cqrs + event sourcing pyxis v2 - en

Delivering New Visibility and Analytics for IT Operations
Delivering New Visibility and Analytics for IT OperationsDelivering New Visibility and Analytics for IT Operations
Delivering New Visibility and Analytics for IT OperationsGabrielle Knowles
 
SplunkLive Wellington 2015 - Operational Intelligence
SplunkLive Wellington 2015 - Operational IntelligenceSplunkLive Wellington 2015 - Operational Intelligence
SplunkLive Wellington 2015 - Operational IntelligenceSplunk
 
SplunkLive Auckland - Operational Intelligence
SplunkLive Auckland - Operational IntelligenceSplunkLive Auckland - Operational Intelligence
SplunkLive Auckland - Operational IntelligenceSplunk
 
Accelerating Cloud Services - Intel
Accelerating Cloud Services - IntelAccelerating Cloud Services - Intel
Accelerating Cloud Services - IntelAmazon Web Services
 
Software-Defined Data Center Case Study – Financial Institution and VMware
Software-Defined Data Center Case Study – Financial Institution and VMwareSoftware-Defined Data Center Case Study – Financial Institution and VMware
Software-Defined Data Center Case Study – Financial Institution and VMwareVMware
 
Qlik and Confluent Success Stories with Kafka - How Generali and Skechers Kee...
Qlik and Confluent Success Stories with Kafka - How Generali and Skechers Kee...Qlik and Confluent Success Stories with Kafka - How Generali and Skechers Kee...
Qlik and Confluent Success Stories with Kafka - How Generali and Skechers Kee...HostedbyConfluent
 
How ddd, cqrs and event sourcing constitute the architecture of the future
How ddd, cqrs and event sourcing constitute the architecture of the futureHow ddd, cqrs and event sourcing constitute the architecture of the future
How ddd, cqrs and event sourcing constitute the architecture of the futureMSDEVMTL
 
Rearchitecting for Innovation.pdf
Rearchitecting for Innovation.pdfRearchitecting for Innovation.pdf
Rearchitecting for Innovation.pdfAmazon Web Services
 
A New Approach to Continuous Monitoring in the Cloud
A New Approach to Continuous Monitoring in the CloudA New Approach to Continuous Monitoring in the Cloud
A New Approach to Continuous Monitoring in the CloudNETSCOUT
 
Monetizing Big Data with Streaming Analytics for Telecoms Service Providers
Monetizing Big Data with Streaming Analytics for Telecoms Service ProvidersMonetizing Big Data with Streaming Analytics for Telecoms Service Providers
Monetizing Big Data with Streaming Analytics for Telecoms Service ProvidersCubic Corporation
 
Software Licensing In The Cloud (CloudWorld 2009)
Software Licensing In The Cloud  (CloudWorld 2009)Software Licensing In The Cloud  (CloudWorld 2009)
Software Licensing In The Cloud (CloudWorld 2009)Stuart Charlton
 
Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016Scott Sims
 
Walden Recruiting Sample Resume Makeover Cc License No Derivs
Walden Recruiting Sample Resume Makeover   Cc License No DerivsWalden Recruiting Sample Resume Makeover   Cc License No Derivs
Walden Recruiting Sample Resume Makeover Cc License No DerivsMarsh Sutherland
 
CLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISECLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISEHung
 
CLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISECLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISEHung Vu
 
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?¿Cómo modernizar una arquitectura de TI con la virtualización de datos?
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?Denodo
 
The Future of Enterprise IT - ENT207 - Chicago AWS Summit
The Future of Enterprise IT - ENT207 - Chicago AWS SummitThe Future of Enterprise IT - ENT207 - Chicago AWS Summit
The Future of Enterprise IT - ENT207 - Chicago AWS SummitAmazon Web Services
 

Semelhante a Cqrs + event sourcing pyxis v2 - en (20)

Delivering New Visibility and Analytics for IT Operations
Delivering New Visibility and Analytics for IT OperationsDelivering New Visibility and Analytics for IT Operations
Delivering New Visibility and Analytics for IT Operations
 
SplunkLive Wellington 2015 - Operational Intelligence
SplunkLive Wellington 2015 - Operational IntelligenceSplunkLive Wellington 2015 - Operational Intelligence
SplunkLive Wellington 2015 - Operational Intelligence
 
SplunkLive Auckland - Operational Intelligence
SplunkLive Auckland - Operational IntelligenceSplunkLive Auckland - Operational Intelligence
SplunkLive Auckland - Operational Intelligence
 
Accelerating Cloud Services - Intel
Accelerating Cloud Services - IntelAccelerating Cloud Services - Intel
Accelerating Cloud Services - Intel
 
Software-Defined Data Center Case Study – Financial Institution and VMware
Software-Defined Data Center Case Study – Financial Institution and VMwareSoftware-Defined Data Center Case Study – Financial Institution and VMware
Software-Defined Data Center Case Study – Financial Institution and VMware
 
Qlik and Confluent Success Stories with Kafka - How Generali and Skechers Kee...
Qlik and Confluent Success Stories with Kafka - How Generali and Skechers Kee...Qlik and Confluent Success Stories with Kafka - How Generali and Skechers Kee...
Qlik and Confluent Success Stories with Kafka - How Generali and Skechers Kee...
 
Devops for Netops
Devops for NetopsDevops for Netops
Devops for Netops
 
How ddd, cqrs and event sourcing constitute the architecture of the future
How ddd, cqrs and event sourcing constitute the architecture of the futureHow ddd, cqrs and event sourcing constitute the architecture of the future
How ddd, cqrs and event sourcing constitute the architecture of the future
 
Rearchitecting for Innovation.pdf
Rearchitecting for Innovation.pdfRearchitecting for Innovation.pdf
Rearchitecting for Innovation.pdf
 
A New Approach to Continuous Monitoring in the Cloud
A New Approach to Continuous Monitoring in the CloudA New Approach to Continuous Monitoring in the Cloud
A New Approach to Continuous Monitoring in the Cloud
 
Monetizing Big Data with Streaming Analytics for Telecoms Service Providers
Monetizing Big Data with Streaming Analytics for Telecoms Service ProvidersMonetizing Big Data with Streaming Analytics for Telecoms Service Providers
Monetizing Big Data with Streaming Analytics for Telecoms Service Providers
 
Software Licensing In The Cloud (CloudWorld 2009)
Software Licensing In The Cloud  (CloudWorld 2009)Software Licensing In The Cloud  (CloudWorld 2009)
Software Licensing In The Cloud (CloudWorld 2009)
 
blah blah Cloud
blah blah Cloudblah blah Cloud
blah blah Cloud
 
Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016
 
Walden Recruiting Sample Resume Makeover Cc License No Derivs
Walden Recruiting Sample Resume Makeover   Cc License No DerivsWalden Recruiting Sample Resume Makeover   Cc License No Derivs
Walden Recruiting Sample Resume Makeover Cc License No Derivs
 
CLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISECLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISE
 
CLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISECLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISE
 
Brikesh_Resume
Brikesh_ResumeBrikesh_Resume
Brikesh_Resume
 
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?¿Cómo modernizar una arquitectura de TI con la virtualización de datos?
¿Cómo modernizar una arquitectura de TI con la virtualización de datos?
 
The Future of Enterprise IT - ENT207 - Chicago AWS Summit
The Future of Enterprise IT - ENT207 - Chicago AWS SummitThe Future of Enterprise IT - ENT207 - Chicago AWS Summit
The Future of Enterprise IT - ENT207 - Chicago AWS Summit
 

Mais de Eric De Carufel

Bracket Show Episode 35 - histoire de c# de 2002 à 2019
Bracket Show Episode 35 - histoire de c# de 2002 à 2019Bracket Show Episode 35 - histoire de c# de 2002 à 2019
Bracket Show Episode 35 - histoire de c# de 2002 à 2019Eric De Carufel
 
Architecture azure performante
Architecture azure performanteArchitecture azure performante
Architecture azure performanteEric De Carufel
 
Refactoring vers les design patterns pyxis v2
Refactoring vers les design patterns   pyxis v2Refactoring vers les design patterns   pyxis v2
Refactoring vers les design patterns pyxis v2Eric De Carufel
 
Refactoring to Design Patterns
Refactoring to Design PatternsRefactoring to Design Patterns
Refactoring to Design PatternsEric De Carufel
 
Top 5 des meilleures façons d'améliorer votre code
Top 5 des meilleures façons d'améliorer votre codeTop 5 des meilleures façons d'améliorer votre code
Top 5 des meilleures façons d'améliorer votre codeEric De Carufel
 
Dvcs mercurial - pyxis - eric de carufel
Dvcs   mercurial - pyxis - eric de carufelDvcs   mercurial - pyxis - eric de carufel
Dvcs mercurial - pyxis - eric de carufelEric De Carufel
 
Top 5 des meilleures façon d'améliorer ton code
Top 5 des meilleures façon d'améliorer ton codeTop 5 des meilleures façon d'améliorer ton code
Top 5 des meilleures façon d'améliorer ton codeEric De Carufel
 

Mais de Eric De Carufel (9)

Bracket Show Episode 35 - histoire de c# de 2002 à 2019
Bracket Show Episode 35 - histoire de c# de 2002 à 2019Bracket Show Episode 35 - histoire de c# de 2002 à 2019
Bracket Show Episode 35 - histoire de c# de 2002 à 2019
 
Gadgteteer clean code
Gadgteteer   clean codeGadgteteer   clean code
Gadgteteer clean code
 
Architecture azure performante
Architecture azure performanteArchitecture azure performante
Architecture azure performante
 
Refactoring vers les design patterns pyxis v2
Refactoring vers les design patterns   pyxis v2Refactoring vers les design patterns   pyxis v2
Refactoring vers les design patterns pyxis v2
 
Refactoring to Design Patterns
Refactoring to Design PatternsRefactoring to Design Patterns
Refactoring to Design Patterns
 
Top 5 des meilleures façons d'améliorer votre code
Top 5 des meilleures façons d'améliorer votre codeTop 5 des meilleures façons d'améliorer votre code
Top 5 des meilleures façons d'améliorer votre code
 
CQRS + Event Sourcing
CQRS + Event SourcingCQRS + Event Sourcing
CQRS + Event Sourcing
 
Dvcs mercurial - pyxis - eric de carufel
Dvcs   mercurial - pyxis - eric de carufelDvcs   mercurial - pyxis - eric de carufel
Dvcs mercurial - pyxis - eric de carufel
 
Top 5 des meilleures façon d'améliorer ton code
Top 5 des meilleures façon d'améliorer ton codeTop 5 des meilleures façon d'améliorer ton code
Top 5 des meilleures façon d'améliorer ton code
 

Último

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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...apidays
 
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...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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.pdfUK Journal
 
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...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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 CVKhem
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

Último (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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...
 
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...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Cqrs + event sourcing pyxis v2 - en

  • 1. CQRS + EVENT SOURCING Design to build a bullet proof architecture
  • 2. we are Expertise Quality Respect /studio Agile Big Data custom CQRS Desktop Event Sourcing Microsoft .NET C# Scrum Software development Training © Pyxis Technologies inc. Web
  • 3. SPLIT COMMAND AND REQUEST © Pyxis Technologies inc. 3
  • 4. TRADITIONAL SYSTEM Relational database Data updates Business logic CRUD User interface © Pyxis Technologies inc. 4
  • 6. WHY ARE WE STILL DOING THIS? © Pyxis Technologies inc. 7
  • 7. WHY ARE WE STILL DOING THIS? © Pyxis Technologies inc. 8
  • 8. LEAP OF FAITH… © Pyxis Technologies inc. 10
  • 9. SPLIT COMMAND AND QUERY TRADITIONAL SYSTEM Relational database Data updates Business logic Commands Requests User interface © Pyxis Technologies inc. 11
  • 10. CQRS - C O M M A N D A N D Q U E R Y R E S P O N S I B I L I T Y S E G R E G AT I O N Relational database Data updates Domain Read model Command handlers Requests Commands User interface © Pyxis Technologies inc. 12
  • 11. CALL TO ACTION  Use verbs instead of nouns  Ask yourself how the user will use your system  Talk in domain language  No simple data editing, more domain actions  Submit commands  Serializable message  Imperative mode  Well defined language  Can a command be refused? © Pyxis Technologies inc. 13
  • 12. CQRS  Commands  Change system state  Asynchronous (for better or worst)  Requests       No system state change Denormalized model Distributable (Charding) Scalable At least 90% of system access Performance © Pyxis Technologies inc. 14
  • 13. ARE WE THERE YET? © Pyxis Technologies inc. 15
  • 14. CQRS - C O M M A N D A N D Q U E R Y R E S P O N S I B I L I T Y S E G R E G AT I O N Relational database Data updates Domain Read model Command handlers Requests Commands User interface © Pyxis Technologies inc. 16
  • 15. CQRS + EVENT SOURCING Events Denormalizer Event Store Event handlers Service BUS XML SQL Domain HTML Read model Command handlers Requests Commands User interface © Pyxis Technologies inc. 17
  • 16. EVENT SOURCING       Model based on behavior not structure Sequential and cumulative Events can be played back Append only Any data structure can be built from events Audit © Pyxis Technologies inc. 18
  • 17. EVENTS  Rolling Snapshot  Optimization  Aggregate root  Transaction scope  Built from events  Commands  ApplyEvent  Events  Can’t fail  No business logic © Pyxis Technologies inc. 19
  • 18. CQRS PIPELINE Event store User interface Commands © Pyxis Technologies inc. Domain changes Events Denormalizer Read models 20
  • 19. THE END  Remember  Events are the only truth  Domain is the heart of the system  Read models are flexible and volatile  Questions?  Eric De Carufel  eric@decarufel.net  http://blog.decarufel.net  http://pyxis-tech.com © Pyxis Technologies inc. 21

Notas do Editor

  1. ** Les application traditionnelle sont découpées en couches.** Tout passe par la logique d’affaire, les commandes et les requêtes.** Il est facile de faire les deux en même temps** Problèmes de performance (optimisé read ou write)** Ajout de cache pour performance** Concurence en écriture, lock de table** La séparation évite qu’une commande retourne de l’information et qu’une requête modifie le modèle
  2. Modèle descriptifCRUD (Create, Read, Update, Delete)Domaine d’affaire définit par des nomsModèle rigide - Base de donnée difficile à modifier sans affecter les systèmesDifficile d’utiliser la modélisation DDDModèle anémiqueLogique d’affaire du côté client ou pire dans la tête des utilisateursScalabilityLa seule option est un BD plus grosse (ou LoadBalancing)Complexité accidentelleModèle de requête de plus en plus complexe et lent
  3. Est-ce qu’on ne fait que suivre les autres?
  4. - Les outils sont présents et faciles- Supporté par toutes les plateformes- Modèle bien connu- Les concepteur de base de données (SQL, Oracle, …) font la promotion ($) de ce modèle.- Confort / résistance au changement
  5. Faite-moi confiance mais la marche est haute!
  6. ** La séparation évite qu’une commande retourne de l’information et qu’une requête modifie le modèle** Mauvaise chose de faire des requête directement à la base de données
  7. ** L’ajout de la gestion des commande et du modèle de lecture renforce le principe de séparation** Comment synchroniser 2 BD?** On a besoind’avoirl’information live en tout temps.** Coming out – On n’estjamais live** Capitalisersurce fait plutôtque de s’enplaindre.** Dans ce contexte la base de donnée est complètement cachée elle est même inutile
  8. ** Une base de données une représentation passive d’un système** Il faut parler d’action et pas de données** Le concept de command fonctionne partout : Commander une pizza par exemple.** Se poser la question si une commande peut être refusé est sais et démontre qu’on porte attention aux règles d’affaires plutôt qu’aux données.
  9. ** L’asynchronicité fait partie du système au lieu d’être gérée comme une exception
  10. **On a les command et les requêtes** Il nous manque les événements
  11. ** L’ajout de la gestion des commande et du modèle de lecture renforce le principe de séparation** Comment synchroniser 2 BD?** On a besoind’avoirl’information live en tout temps.** Coming out – On n’estjamais live** Capitalisersurce fait plutôtque de s’enplaindre.** Dans ce contexte la base de donnée est complètement cachée elle est même inutile
  12. ** Plusieurs façon de voir la vérité dépendamment du point de vue. Ex: Changement d’adresse, Paye (dépense vs gain)** La seule vérité du système réside en ce qui c’est réellement passé, donc dans les événements.** Le modèle de lecture peux être persisté dans la forme la plus proche de sa consultation.** Le processus de mise à jour du modèle passe par la réception et le gestion des événement et par la transformation (dénormalisation) de l’événement en données utiles** Le Service BUS assure le transport des événement entre les différents systèmes.