SlideShare a Scribd company logo
1 of 36
Serverless CQRS in Azure!
Toon Vanhoutte
https://be.linkedin.com/pub/toon-vanhoutte/6/276/84b
Toon Vanhoutte
Serverless CQRS in Azure!
Nice to meet you
Toon Vanhoutte
Lead Architect @ Codit Belgium
Microsoft Azure MVP
@toonvanhoutte
toonvanhoutte.wordpress.com
www.linkedin.com/in/toon-vanhoutte
Who we are
Customers Entities
2000 Belgium
2004 France
2013 Portugal
2016 Switzerland
2016 UK
2016 The Netherlands
2017 Malta
150
worldwide
The thing we do
Agenda
• An Introduction to CQRS
• Serverless Technologies in Azure
• Use Case: Optimize a Webshop
• Conclusion
6
An introduction to CQRS
CRUD Architecture
Proven and simple design
Command Query Responsibility Segregation
Dealing with complex domain models
Command Query Responsibility Segregation
Dealing with high performing applications
Commands vs Queries
Write
Reliable
Sync / Async
Transactional
Persistent
Commands Queries
Read
Volatile
Sync
Non Transactional
In Memory
Fast Fast
Serverless in Azure
Pizza as a Service
14
Serverless Technology Options
Azure Functions
“Code triggered by events”
Azure Logic Apps
“Workflows triggered by events”
Azure Event Grid
“Serverless event routing service”
Azure Service Bus
“Reliable messaging platform”
Pricing Model
Security
Runtime
Monitoring
Deployment
State
Networking
Connectivity
Exception Handling
Developer experience
Azure Functions Azure Logic Apps
Azure Functions Azure Logic Apps
Preferred option for
complex synchronous
request/response calls.
Preferred option for
asynchronous fire-and-
forget messaging.
Azure Functions
perfectly extends
Azure Logic Apps.
Command
Query
Report
TransferNotification
MeasurementAssignment
Job
Update
Request Trace
Handover
Azure Service Bus Azure Event Grid
© Clemens Vasters
Azure Service Bus Azure Event Grid
Command
Query
ReportTransfer
Notification
Measurement
Assignment
Job
Update
Request
Trace
Handover
Passing Intents Reporting Facts
Messaging
Eventing
Discrete
Series
© Clemens Vasters
Azure Service Bus Azure Event Grid
Passing Intents Reporting Facts
Messaging
Eventing
Discrete
Series
“PriceUpdated”
“OpportunityWon”
“InvoiceBooked”
Temperature stream
Telemetry data
Audit trail
“CreateOrder”
“BookHotel”
“UpdateStock”
© Clemens Vasters
Use Case
Pizza Antonio
Find out how CQRS will save
Antonio’s business!
Pizza Antonio
Website
€ 10€ 12€ 11
Submit
Query
Command
Pizza Antonio
QueryCommand
GetProducts
CreateOrder
SQLDatabase
Very good pizza’s
Customers get errors when ordering pizza during peak hours
Pizza Antonio
QueryCommand
GetProducts
CreateOrder
SQLDatabase
Customers don’t get any errors anymore
The orders don’t make it to the database, so no pizza
Pizza Antonio
QueryCommand
GetProducts
CreateOrder
SQLDatabase
All orders make it to the database
Polling during quiet hours is rather expensive, so more expensive pizza’s
Pizza Antonio
QueryCommand
GetProducts
CreateOrder
SQLDatabase
Cheaper polling mechanism, so again sharper prices
No flexible way to send order confirmations through email
Pizza Antonio
QueryCommand
GetProducts
CreateOrder
SQLDatabase
Flexible extension points for e.g. emails
Two different URL’s and security keys for the website
Pizza Antonio
QueryCommand
SQLDatabase
GetProducts
CreateOrder
AzureFunctionProxy
Uniform API for website
Loading products on the website is extremely slow during peak hours
Pizza Antonio
QueryCommand
SQLDatabase
GetProducts
CreateOrder
AzureFunctionProxy
Fast responsive times on the website
No flexible way to update products on external food delivery services
Pizza Antonio
QueryCommand
GetProducts
CreateOrder
SQLDatabase
AzureFunctionProxy
Pizza Antonio
QueryCommand
GetProducts
CreateOrder
SQLDatabase
AzureFunctionProxy
Antonio happy
Customers happy
Conclusion
CQRS is a proven design pattern!
It exists in many different variations
Azure Function Proxy
SQL Database
QueryCommand
Sentinet
SQL Database
QueryCommand
Azure API Mgmt
SQL Database
QueryCommand
Cache
Lessons learned
Azure Functions Azure Event Grid
Consumption plan results
in cold starts, also for
function proxies!
Solution:
• Keep it warm (5 min)
• App Service Plan
• Pre-compiled
functions
Event Grid puts
responsibility for
sequencing at receive side!
Solution:
• Use it wisely
• Consider Azure Service
Bus if sequencing is
required
Architectural Advise on CQRS
Do not overengineer!
Performance
Flexibility
Scalability
Advantages
Idempotence
Resiliency
Eventual Consistency
Challenges
Complexity
Maintenance
Monitoring
Disadvantages
Apply CQRS carefully on specific parts of the solution!
Thank you!
Keep in touch.
@toonvanhoutte
toonvanhoutte.wordpress.com
www.linkedin.com/in/toon-vanhoutte

More Related Content

What's hot

Azure architecture
Azure architectureAzure architecture
Azure architecture
Amal Dev
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting started
Munish Mehta
 

What's hot (20)

Understanding cloud with Google Cloud Platform
Understanding cloud with Google Cloud PlatformUnderstanding cloud with Google Cloud Platform
Understanding cloud with Google Cloud Platform
 
Microsoft Azure Cloud Services
Microsoft Azure Cloud ServicesMicrosoft Azure Cloud Services
Microsoft Azure Cloud Services
 
Microsoft Azure Overview
Microsoft Azure OverviewMicrosoft Azure Overview
Microsoft Azure Overview
 
The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knative
 
Microservices Architectures on Amazon Web Services
Microservices Architectures on Amazon Web ServicesMicroservices Architectures on Amazon Web Services
Microservices Architectures on Amazon Web Services
 
Microsoft Azure Overview | Cloud Computing Tutorial with Azure | Azure Traini...
Microsoft Azure Overview | Cloud Computing Tutorial with Azure | Azure Traini...Microsoft Azure Overview | Cloud Computing Tutorial with Azure | Azure Traini...
Microsoft Azure Overview | Cloud Computing Tutorial with Azure | Azure Traini...
 
Serverless Computing in Azure
Serverless Computing in AzureServerless Computing in Azure
Serverless Computing in Azure
 
Windows Virtual Desktop Customer benefits
Windows Virtual Desktop Customer benefitsWindows Virtual Desktop Customer benefits
Windows Virtual Desktop Customer benefits
 
Azure architecture
Azure architectureAzure architecture
Azure architecture
 
CQRS: Command/Query Responsibility Segregation
CQRS: Command/Query Responsibility SegregationCQRS: Command/Query Responsibility Segregation
CQRS: Command/Query Responsibility Segregation
 
Microservices and SOA
Microservices and SOAMicroservices and SOA
Microservices and SOA
 
Introduction to soa suite 12c in 20 slides
Introduction to soa suite 12c in 20 slidesIntroduction to soa suite 12c in 20 slides
Introduction to soa suite 12c in 20 slides
 
Azure container instances
Azure container instancesAzure container instances
Azure container instances
 
Azure API Management
Azure API ManagementAzure API Management
Azure API Management
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting started
 
Windows365 Hybrid Windows for a Hybrid World
Windows365 Hybrid Windows for a Hybrid WorldWindows365 Hybrid Windows for a Hybrid World
Windows365 Hybrid Windows for a Hybrid World
 
Architecture: Microservices
Architecture: MicroservicesArchitecture: Microservices
Architecture: Microservices
 
The Microsoft Well Architected Framework For Data Analytics
The Microsoft Well Architected Framework For Data AnalyticsThe Microsoft Well Architected Framework For Data Analytics
The Microsoft Well Architected Framework For Data Analytics
 
Azure Cloud PPT
Azure Cloud PPTAzure Cloud PPT
Azure Cloud PPT
 
Azure Site Recovery - BC/DR - Migrations & assessments in 60 minutes!
Azure Site Recovery - BC/DR - Migrations & assessments in 60 minutes!Azure Site Recovery - BC/DR - Migrations & assessments in 60 minutes!
Azure Site Recovery - BC/DR - Migrations & assessments in 60 minutes!
 

Similar to Serverless CQRS in Azure!

QuickBooks to SugarCRM Integration as a SaaS Service | SugarCon 2011
QuickBooks to SugarCRM Integration as a SaaS Service | SugarCon 2011QuickBooks to SugarCRM Integration as a SaaS Service | SugarCon 2011
QuickBooks to SugarCRM Integration as a SaaS Service | SugarCon 2011
SugarCRM
 

Similar to Serverless CQRS in Azure! (20)

Brewing Beer with Windows Azure - ASPConf
Brewing Beer with Windows Azure - ASPConfBrewing Beer with Windows Azure - ASPConf
Brewing Beer with Windows Azure - ASPConf
 
Code first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with AzureCode first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with Azure
 
SAP and SharePoint interoperability using Duet Enterprise
SAP and SharePoint interoperability using Duet EnterpriseSAP and SharePoint interoperability using Duet Enterprise
SAP and SharePoint interoperability using Duet Enterprise
 
What's new in sharepoint 2016
What's new in sharepoint 2016What's new in sharepoint 2016
What's new in sharepoint 2016
 
Serverless integrations using Azure Logic Apps (intro)
Serverless integrations using Azure Logic Apps (intro)Serverless integrations using Azure Logic Apps (intro)
Serverless integrations using Azure Logic Apps (intro)
 
O365 saturday: How to (remote) control office 365 with windows azure-slideshare
O365 saturday: How to (remote) control office 365 with windows azure-slideshareO365 saturday: How to (remote) control office 365 with windows azure-slideshare
O365 saturday: How to (remote) control office 365 with windows azure-slideshare
 
Azure Functions Hands-on lab | Global Azure Bootcamp | Radu Vunvulea
Azure Functions Hands-on lab | Global Azure Bootcamp | Radu VunvuleaAzure Functions Hands-on lab | Global Azure Bootcamp | Radu Vunvulea
Azure Functions Hands-on lab | Global Azure Bootcamp | Radu Vunvulea
 
Brewing Beer with Windows Azure - NDC2013
Brewing Beer with Windows Azure - NDC2013Brewing Beer with Windows Azure - NDC2013
Brewing Beer with Windows Azure - NDC2013
 
Azure integration services from the IT Professional perspective
Azure integration services from the IT Professional perspectiveAzure integration services from the IT Professional perspective
Azure integration services from the IT Professional perspective
 
Brewing Beer with Windows Azure
Brewing Beer with Windows AzureBrewing Beer with Windows Azure
Brewing Beer with Windows Azure
 
Getting started with development in azure
Getting started with development in azureGetting started with development in azure
Getting started with development in azure
 
Getting started with Azure Event Hubs and Stream Analytics services
Getting started with Azure Event Hubs and Stream Analytics servicesGetting started with Azure Event Hubs and Stream Analytics services
Getting started with Azure Event Hubs and Stream Analytics services
 
QuickBooks to SugarCRM Integration as a SaaS Service | SugarCon 2011
QuickBooks to SugarCRM Integration as a SaaS Service | SugarCon 2011QuickBooks to SugarCRM Integration as a SaaS Service | SugarCon 2011
QuickBooks to SugarCRM Integration as a SaaS Service | SugarCon 2011
 
Azure from Rookie to DevStart
Azure from Rookie to DevStartAzure from Rookie to DevStart
Azure from Rookie to DevStart
 
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)
 
Journey to the cloud, the why and how of serverless
Journey to the cloud, the why and how of serverlessJourney to the cloud, the why and how of serverless
Journey to the cloud, the why and how of serverless
 
2015-06-10 Ceus by IberianSPC - new options for SharePoint 2016 and Office 36...
2015-06-10 Ceus by IberianSPC - new options for SharePoint 2016 and Office 36...2015-06-10 Ceus by IberianSPC - new options for SharePoint 2016 and Office 36...
2015-06-10 Ceus by IberianSPC - new options for SharePoint 2016 and Office 36...
 
Beyond serverless.pptx
Beyond serverless.pptxBeyond serverless.pptx
Beyond serverless.pptx
 
Put Your Existing Application On Windows Azure
Put Your Existing Application On Windows AzurePut Your Existing Application On Windows Azure
Put Your Existing Application On Windows Azure
 
Kovair QuickSync Overview
Kovair QuickSync OverviewKovair QuickSync Overview
Kovair QuickSync Overview
 

More from BizTalk360

More from BizTalk360 (20)

Optimise Business Activity Tracking – Insights from Smurfit Kappa
Optimise Business Activity Tracking – Insights from Smurfit KappaOptimise Business Activity Tracking – Insights from Smurfit Kappa
Optimise Business Activity Tracking – Insights from Smurfit Kappa
 
Optimise Business Activity Tracking – Insights from Smurfit Kappa
Optimise Business Activity Tracking – Insights from Smurfit KappaOptimise Business Activity Tracking – Insights from Smurfit Kappa
Optimise Business Activity Tracking – Insights from Smurfit Kappa
 
What's inside "migrating to biz talk server 2020" Book (BizTalk360 Webinar)
What's inside "migrating to biz talk server 2020" Book (BizTalk360 Webinar)What's inside "migrating to biz talk server 2020" Book (BizTalk360 Webinar)
What's inside "migrating to biz talk server 2020" Book (BizTalk360 Webinar)
 
Integration Monday - Logic Apps: Development Experiences
Integration Monday - Logic Apps: Development ExperiencesIntegration Monday - Logic Apps: Development Experiences
Integration Monday - Logic Apps: Development Experiences
 
Integration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveIntegration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep Dive
 
Testing for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration MondayTesting for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration Monday
 
No-Slides
No-SlidesNo-Slides
No-Slides
 
System Integration using Reactive Programming | Integration Monday
System Integration using Reactive Programming | Integration MondaySystem Integration using Reactive Programming | Integration Monday
System Integration using Reactive Programming | Integration Monday
 
Building workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration MondayBuilding workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration Monday
 
Serverless Minimalism: How to architect your apps to save 98% on your Azure b...
Serverless Minimalism: How to architect your apps to save 98% on your Azure b...Serverless Minimalism: How to architect your apps to save 98% on your Azure b...
Serverless Minimalism: How to architect your apps to save 98% on your Azure b...
 
Migrating BizTalk Solutions to Azure: Mapping Messages | Integration Monday
Migrating BizTalk Solutions to Azure: Mapping Messages | Integration MondayMigrating BizTalk Solutions to Azure: Mapping Messages | Integration Monday
Migrating BizTalk Solutions to Azure: Mapping Messages | Integration Monday
 
Integration-Monday-Infrastructure-As-Code-With-Terraform
Integration-Monday-Infrastructure-As-Code-With-TerraformIntegration-Monday-Infrastructure-As-Code-With-Terraform
Integration-Monday-Infrastructure-As-Code-With-Terraform
 
Integration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-FunctionsIntegration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-Functions
 
Integration-Monday-Serverless-Slackbots-with-Azure-Durable-Functions
Integration-Monday-Serverless-Slackbots-with-Azure-Durable-FunctionsIntegration-Monday-Serverless-Slackbots-with-Azure-Durable-Functions
Integration-Monday-Serverless-Slackbots-with-Azure-Durable-Functions
 
Integration-Monday-Building-Stateful-Workloads-Kubernetes
Integration-Monday-Building-Stateful-Workloads-KubernetesIntegration-Monday-Building-Stateful-Workloads-Kubernetes
Integration-Monday-Building-Stateful-Workloads-Kubernetes
 
Integration-Monday-Logic-Apps-Tips-Tricks
Integration-Monday-Logic-Apps-Tips-TricksIntegration-Monday-Logic-Apps-Tips-Tricks
Integration-Monday-Logic-Apps-Tips-Tricks
 
Integration-Monday-Terraform-Serverless
Integration-Monday-Terraform-ServerlessIntegration-Monday-Terraform-Serverless
Integration-Monday-Terraform-Serverless
 
Integration-Monday-Microsoft-Power-Platform
Integration-Monday-Microsoft-Power-PlatformIntegration-Monday-Microsoft-Power-Platform
Integration-Monday-Microsoft-Power-Platform
 
One name unify them all
One name unify them allOne name unify them all
One name unify them all
 
Securely Publishing Azure Services
Securely Publishing Azure ServicesSecurely Publishing Azure Services
Securely Publishing Azure Services
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
[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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Serverless CQRS in Azure!

Editor's Notes

  1. From a DDD perspective, where the business complexity requires two separate models for read and write models. Eg one database with write against database tables and reads done based on views that are optimized for the UI
  2. Improve performance, scalability and flexibility
  3. Improve performance, scalability and flexibility