SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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
 

Tendances (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
 

Similaire à Build Bulletproof Architecture with CQRS and Event Sourcing

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 Auckland - Operational Intelligence
SplunkLive Auckland - Operational IntelligenceSplunkLive Auckland - Operational Intelligence
SplunkLive Auckland - Operational IntelligenceSplunk
 
SplunkLive Wellington 2015 - Operational Intelligence
SplunkLive Wellington 2015 - Operational IntelligenceSplunkLive Wellington 2015 - Operational Intelligence
SplunkLive Wellington 2015 - 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
 

Similaire à Build Bulletproof Architecture with CQRS and Event Sourcing (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 Auckland - Operational Intelligence
SplunkLive Auckland - Operational IntelligenceSplunkLive Auckland - Operational Intelligence
SplunkLive Auckland - Operational Intelligence
 
SplunkLive Wellington 2015 - Operational Intelligence
SplunkLive Wellington 2015 - Operational IntelligenceSplunkLive Wellington 2015 - Operational Intelligence
SplunkLive Wellington 2015 - 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
 

Plus 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
 

Plus 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
 

Dernier

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 

Dernier (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 

Build Bulletproof Architecture with CQRS and Event Sourcing

  • 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

Notes de l'éditeur

  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.