SlideShare a Scribd company logo
1 of 13
CQRS with dot net
services
Akshay Chirde
Vipin Kumar
Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
 Punctuality
Join the session 5 minutes prior to the session start time. We start on
time and conclude on time!
 Feedback
Make sure to submit a constructive feedback for all sessions as it is very
helpful for the presenter.
 Silent Mode
Keep your mobile devices in silent mode, feel free to move out of session
in case you need to attend an urgent call.
 Avoid Disturbance
Avoid unwanted chit chat during the session.
1. Introduction to CQRS
2. Introduction to MediatR
3. Key component of CQRS
4. When to use CQRS
5. Advantages of CQRS
6. Demo
7. Conclusion
Introduction to CQRS
 CQRS Stand for Command and Query Responsibility Segregation and uses to separate the read
(queries) and write(Command).
 Queries Perform read operation and Command perform writes operation like create, update,
delete and return data
 As we know, in our application we mostly use single data model to read and write data, which will
work fine and perform CRUD operation easily but when application is vast in that case in that
case our queries return different types of data as an object so that it become hard to manage with
different DTO objects.
 Also, the same model is used to perform a write operation. As result, the model becomes more
complex, Also, when we use same model for both read and write operation the security also hard
to manage when application is large, and entity might expose data in wrong context due to the
workload on the same model
 CQRS helps to decouple operation and make the application more scalable and flexible on large
scale
Introduction to MediatR
 MediatR pattern is helps us to manage dependencies between object by preventing them from
directly communicating with each other.
 MediatR pattern helps to reduce direct dependency between multiple objects and make them
collaborative through MediatR
 Instead, the communication happen through the MediatR and this helps to implement CQRS
 Command and Queries are sent to MediatR that map them to their respective handlers.
 .NET Core MediatR provides classes that helps to communicate with multiple objects efficiently in
loosely coupled manner
Key Component of CQRS in .NET
 Commands: Represent actions that change the state. They are handled by command handlers.
 Queries: Represent data retrieval without side effects. They are handled by queries handlers.
 Domain Models: Define the business logic and rules.
 Read models: Optimized for queries, can be denormalized for performance.
 Write models: Focused on encapsulating business logic and state changes.
CQRS and MediatR with .NET Services
When to use CQRS
 When application is huge and access the same data in parallel.
 CQRS helps reduce the merge conflict while performing multiple operation with data
 In DDD terminology, if domain data model is complex and need to perform many operation on
priority like validation and executing some business logic so in that case, we need consistency
 When has a high demand for data consumption.
 Performance of data read must be tuned separately from the performance of data writes,
especially when the number of read is much greater than the number of writes.
 There is a need for a team to focus on the complex domain model that is part of write model,
while another team can focus on the read model and user interface.
Advantages of CQRS
 Separation of concern – when read and write side are separated, the model become more
maintainable and flexible. The read model is typically simpler, while write model involves more
complex business logic.
 Optimized data schemas – On read side, a schema can be optimized for queries and on write
side, a schema can be optimized for updates
 Simpler queries – Application queries can avoid complex join by storing a materialized view in
the read database
 Security – it's easier to ensure that only the right domain entities are performing writes on the
data
Conclusion
 We discussed the CQRS and MediatR with .NET services and CQRS are great architecture
pattern and very useful feature software architecture and their benefits in large scale applications
and implementation of CQRS and MediatR with .NET services.
CQRS with dot net services presentation.

More Related Content

Similar to CQRS with dot net services presentation.

IBM --Enterprise messaging in the cloud
IBM --Enterprise messaging in the cloudIBM --Enterprise messaging in the cloud
IBM --Enterprise messaging in the cloudAbhishek Sood
 
cloud services and providers
cloud services and providerscloud services and providers
cloud services and providersKalai Selvi
 
Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patternsMd. Sadhan Sarker
 
Microservices and developer pattern saga
Microservices and developer pattern sagaMicroservices and developer pattern saga
Microservices and developer pattern sagaviktorklyuster
 
About microservices on cloud computing services
About microservices on cloud computing servicesAbout microservices on cloud computing services
About microservices on cloud computing servicesssuser53aac4
 
MuleSoft Surat Virtual Meetup#32 - Implementing Command and Query Responsibil...
MuleSoft Surat Virtual Meetup#32 - Implementing Command and Query Responsibil...MuleSoft Surat Virtual Meetup#32 - Implementing Command and Query Responsibil...
MuleSoft Surat Virtual Meetup#32 - Implementing Command and Query Responsibil...Jitendra Bafna
 
An Comparison with Property Based Resource Attestation to Secure Cloud Enviro...
An Comparison with Property Based Resource Attestation to Secure Cloud Enviro...An Comparison with Property Based Resource Attestation to Secure Cloud Enviro...
An Comparison with Property Based Resource Attestation to Secure Cloud Enviro...cscpconf
 
A Secure, Scalable, Flexible and Fine-Grained Access Control Using Hierarchic...
A Secure, Scalable, Flexible and Fine-Grained Access Control Using Hierarchic...A Secure, Scalable, Flexible and Fine-Grained Access Control Using Hierarchic...
A Secure, Scalable, Flexible and Fine-Grained Access Control Using Hierarchic...Editor IJCATR
 
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
 
Campus Network Design Presentaion.pptx
Campus Network Design Presentaion.pptxCampus Network Design Presentaion.pptx
Campus Network Design Presentaion.pptxMejanurRahmanJunayed
 
IRJET - Multitenancy using Cloud Computing Features
IRJET - Multitenancy using Cloud Computing FeaturesIRJET - Multitenancy using Cloud Computing Features
IRJET - Multitenancy using Cloud Computing FeaturesIRJET Journal
 
Cloud computing, Basic Concepts, SOA,
Cloud computing, Basic Concepts, SOA, Cloud computing, Basic Concepts, SOA,
Cloud computing, Basic Concepts, SOA, Dr Neelesh Jain
 
Cloud computing Latest Interview Questions with Answers by Garuda Trainings
Cloud computing Latest Interview Questions with Answers by Garuda TrainingsCloud computing Latest Interview Questions with Answers by Garuda Trainings
Cloud computing Latest Interview Questions with Answers by Garuda TrainingsGaruda Trainings
 
SecSecuring Software as a Service Model of Cloud Computing: Issues and Solutions
SecSecuring Software as a Service Model of Cloud Computing: Issues and SolutionsSecSecuring Software as a Service Model of Cloud Computing: Issues and Solutions
SecSecuring Software as a Service Model of Cloud Computing: Issues and Solutionsijccsa
 
Understanding_the_Cloud
Understanding_the_CloudUnderstanding_the_Cloud
Understanding_the_CloudMelissa Kattke
 

Similar to CQRS with dot net services presentation. (20)

IBM --Enterprise messaging in the cloud
IBM --Enterprise messaging in the cloudIBM --Enterprise messaging in the cloud
IBM --Enterprise messaging in the cloud
 
cloud services and providers
cloud services and providerscloud services and providers
cloud services and providers
 
Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patterns
 
ZhuSem.ppt
ZhuSem.pptZhuSem.ppt
ZhuSem.ppt
 
Microservices and developer pattern saga
Microservices and developer pattern sagaMicroservices and developer pattern saga
Microservices and developer pattern saga
 
About microservices on cloud computing services
About microservices on cloud computing servicesAbout microservices on cloud computing services
About microservices on cloud computing services
 
Refactoring to Microservice Architecture
Refactoring to Microservice ArchitectureRefactoring to Microservice Architecture
Refactoring to Microservice Architecture
 
MuleSoft Surat Virtual Meetup#32 - Implementing Command and Query Responsibil...
MuleSoft Surat Virtual Meetup#32 - Implementing Command and Query Responsibil...MuleSoft Surat Virtual Meetup#32 - Implementing Command and Query Responsibil...
MuleSoft Surat Virtual Meetup#32 - Implementing Command and Query Responsibil...
 
An Comparison with Property Based Resource Attestation to Secure Cloud Enviro...
An Comparison with Property Based Resource Attestation to Secure Cloud Enviro...An Comparison with Property Based Resource Attestation to Secure Cloud Enviro...
An Comparison with Property Based Resource Attestation to Secure Cloud Enviro...
 
Ogsi standards
Ogsi standardsOgsi standards
Ogsi standards
 
A Secure, Scalable, Flexible and Fine-Grained Access Control Using Hierarchic...
A Secure, Scalable, Flexible and Fine-Grained Access Control Using Hierarchic...A Secure, Scalable, Flexible and Fine-Grained Access Control Using Hierarchic...
A Secure, Scalable, Flexible and Fine-Grained Access Control Using Hierarchic...
 
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
 
Public cloud
Public cloudPublic cloud
Public cloud
 
Campus Network Design Presentaion.pptx
Campus Network Design Presentaion.pptxCampus Network Design Presentaion.pptx
Campus Network Design Presentaion.pptx
 
IRJET - Multitenancy using Cloud Computing Features
IRJET - Multitenancy using Cloud Computing FeaturesIRJET - Multitenancy using Cloud Computing Features
IRJET - Multitenancy using Cloud Computing Features
 
Scheduling in CCE
Scheduling in CCEScheduling in CCE
Scheduling in CCE
 
Cloud computing, Basic Concepts, SOA,
Cloud computing, Basic Concepts, SOA, Cloud computing, Basic Concepts, SOA,
Cloud computing, Basic Concepts, SOA,
 
Cloud computing Latest Interview Questions with Answers by Garuda Trainings
Cloud computing Latest Interview Questions with Answers by Garuda TrainingsCloud computing Latest Interview Questions with Answers by Garuda Trainings
Cloud computing Latest Interview Questions with Answers by Garuda Trainings
 
SecSecuring Software as a Service Model of Cloud Computing: Issues and Solutions
SecSecuring Software as a Service Model of Cloud Computing: Issues and SolutionsSecSecuring Software as a Service Model of Cloud Computing: Issues and Solutions
SecSecuring Software as a Service Model of Cloud Computing: Issues and Solutions
 
Understanding_the_Cloud
Understanding_the_CloudUnderstanding_the_Cloud
Understanding_the_Cloud
 

More from Knoldus Inc.

Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxKnoldus Inc.
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxKnoldus Inc.
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxKnoldus Inc.
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationKnoldus Inc.
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationKnoldus Inc.
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIsKnoldus Inc.
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II PresentationKnoldus Inc.
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAKnoldus Inc.
 
Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Knoldus Inc.
 
Azure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptxAzure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptxKnoldus Inc.
 
The Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and KotlinThe Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and KotlinKnoldus Inc.
 
Data Engineering with Databricks Presentation
Data Engineering with Databricks PresentationData Engineering with Databricks Presentation
Data Engineering with Databricks PresentationKnoldus Inc.
 
Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)Knoldus Inc.
 
NoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptxNoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptxKnoldus Inc.
 
Mastering Distributed Performance Testing
Mastering Distributed Performance TestingMastering Distributed Performance Testing
Mastering Distributed Performance TestingKnoldus Inc.
 
MLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptxMLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptxKnoldus Inc.
 
Introduction to Ansible Tower Presentation
Introduction to Ansible Tower PresentationIntroduction to Ansible Tower Presentation
Introduction to Ansible Tower PresentationKnoldus Inc.
 
Building Resilient Software A Deep Dive into Self-Healing Test Automation Fra...
Building Resilient Software A Deep Dive into Self-Healing Test Automation Fra...Building Resilient Software A Deep Dive into Self-Healing Test Automation Fra...
Building Resilient Software A Deep Dive into Self-Healing Test Automation Fra...Knoldus Inc.
 
Introduction to Buildpacks.io Presentation
Introduction to Buildpacks.io PresentationIntroduction to Buildpacks.io Presentation
Introduction to Buildpacks.io PresentationKnoldus Inc.
 

More from Knoldus Inc. (20)

Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptx
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptx
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptx
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake Presentation
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics Presentation
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II Presentation
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRA
 
Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)
 
Azure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptxAzure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptx
 
The Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and KotlinThe Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and Kotlin
 
Data Engineering with Databricks Presentation
Data Engineering with Databricks PresentationData Engineering with Databricks Presentation
Data Engineering with Databricks Presentation
 
Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)
 
NoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptxNoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptx
 
Mastering Distributed Performance Testing
Mastering Distributed Performance TestingMastering Distributed Performance Testing
Mastering Distributed Performance Testing
 
MLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptxMLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptx
 
Introduction to Ansible Tower Presentation
Introduction to Ansible Tower PresentationIntroduction to Ansible Tower Presentation
Introduction to Ansible Tower Presentation
 
Building Resilient Software A Deep Dive into Self-Healing Test Automation Fra...
Building Resilient Software A Deep Dive into Self-Healing Test Automation Fra...Building Resilient Software A Deep Dive into Self-Healing Test Automation Fra...
Building Resilient Software A Deep Dive into Self-Healing Test Automation Fra...
 
Introduction to Buildpacks.io Presentation
Introduction to Buildpacks.io PresentationIntroduction to Buildpacks.io Presentation
Introduction to Buildpacks.io Presentation
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
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
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"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
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"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...
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

CQRS with dot net services presentation.

  • 1. CQRS with dot net services Akshay Chirde Vipin Kumar
  • 2. Lack of etiquette and manners is a huge turn off. KnolX Etiquettes  Punctuality Join the session 5 minutes prior to the session start time. We start on time and conclude on time!  Feedback Make sure to submit a constructive feedback for all sessions as it is very helpful for the presenter.  Silent Mode Keep your mobile devices in silent mode, feel free to move out of session in case you need to attend an urgent call.  Avoid Disturbance Avoid unwanted chit chat during the session.
  • 3. 1. Introduction to CQRS 2. Introduction to MediatR 3. Key component of CQRS 4. When to use CQRS 5. Advantages of CQRS 6. Demo 7. Conclusion
  • 4.
  • 5. Introduction to CQRS  CQRS Stand for Command and Query Responsibility Segregation and uses to separate the read (queries) and write(Command).  Queries Perform read operation and Command perform writes operation like create, update, delete and return data  As we know, in our application we mostly use single data model to read and write data, which will work fine and perform CRUD operation easily but when application is vast in that case in that case our queries return different types of data as an object so that it become hard to manage with different DTO objects.  Also, the same model is used to perform a write operation. As result, the model becomes more complex, Also, when we use same model for both read and write operation the security also hard to manage when application is large, and entity might expose data in wrong context due to the workload on the same model  CQRS helps to decouple operation and make the application more scalable and flexible on large scale
  • 6. Introduction to MediatR  MediatR pattern is helps us to manage dependencies between object by preventing them from directly communicating with each other.  MediatR pattern helps to reduce direct dependency between multiple objects and make them collaborative through MediatR  Instead, the communication happen through the MediatR and this helps to implement CQRS  Command and Queries are sent to MediatR that map them to their respective handlers.  .NET Core MediatR provides classes that helps to communicate with multiple objects efficiently in loosely coupled manner
  • 7. Key Component of CQRS in .NET  Commands: Represent actions that change the state. They are handled by command handlers.  Queries: Represent data retrieval without side effects. They are handled by queries handlers.  Domain Models: Define the business logic and rules.  Read models: Optimized for queries, can be denormalized for performance.  Write models: Focused on encapsulating business logic and state changes.
  • 8. CQRS and MediatR with .NET Services
  • 9. When to use CQRS  When application is huge and access the same data in parallel.  CQRS helps reduce the merge conflict while performing multiple operation with data  In DDD terminology, if domain data model is complex and need to perform many operation on priority like validation and executing some business logic so in that case, we need consistency  When has a high demand for data consumption.  Performance of data read must be tuned separately from the performance of data writes, especially when the number of read is much greater than the number of writes.  There is a need for a team to focus on the complex domain model that is part of write model, while another team can focus on the read model and user interface.
  • 10. Advantages of CQRS  Separation of concern – when read and write side are separated, the model become more maintainable and flexible. The read model is typically simpler, while write model involves more complex business logic.  Optimized data schemas – On read side, a schema can be optimized for queries and on write side, a schema can be optimized for updates  Simpler queries – Application queries can avoid complex join by storing a materialized view in the read database  Security – it's easier to ensure that only the right domain entities are performing writes on the data
  • 11.
  • 12. Conclusion  We discussed the CQRS and MediatR with .NET services and CQRS are great architecture pattern and very useful feature software architecture and their benefits in large scale applications and implementation of CQRS and MediatR with .NET services.