SlideShare a Scribd company logo
1 of 57
itcampro@ itcamp13# Premium conference on Microsoft technologies
Messaging Patterns in the
Cloud
Radu Vunvulea
iQuest Group
@RaduVunvulea
http://vunvulearadu.blogspot.com
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudHuge thanks to our sponsors!
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• World of Messages
• On-Premise and Cloud solutions
• Messaging Patterns
• Costs, Benefits and Limitations
Agenda
itcampro@ itcamp13# Premium conference on Microsoft technologies
WORLD OF MESSAGES
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudWorld of Messages
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudWorld of Messages
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudWorld of Messages
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudWorld of Messages
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudWorld of Messages
Message
Message
Message
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudEnterprise Service Bus
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudEnterprise Service Bus
Interaction and communication between
software applications
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudEnterprise Service Bus
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudEnterprise Service Bus
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudEnterprise Service Bus
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudEnterprise Service Bus
itcampro@ itcamp13# Premium conference on Microsoft technologies
ON-PREMISE AND CLOUD
SOLUTIONS
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Pro
– Open Source
– Flexible
– Good price
– Transactional queue read/write
– Flexible load distribution
• Cons
– No queue management
– Document not up to date
– Only one queue technology supported (MSMQ)
NService Bus
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Pro
– Free for commercial use
– Supports MSMQ and RabittMQ
– Open Source
– Good administration console
• Cons
– No commercial support
– Not as fast as NServiceBus
MassTransit
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Pro
– Scalable
– Lots of features
– Good administration console
– Support
– Cross platform and multiple environments
• Cons
– Is not free
– Latency
Azure Service Bus
itcampro@ itcamp13# Premium conference on Microsoft technologies
MESSAGING PATTERNS
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Filter
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Filter
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Custom rules based on message attributes
• Add attributes to message
Message Filter
BrokeredMessage msg = new BrokeredMessage(messageContent);
msg.Properties["colorCode"] = 1;
• Create subscription with custom rule
RuleDescription rule = new RuleDescription()
{
// 1 - green, 2 - orange
Filter = new SqlFilter("colorCode = 1");
}
namespaceManager.CreateSubscription(
"itcamp", "greensubscription", rule);
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Splitter
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Splitter
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Group messages based on session
Message Splitter
MessageSession msgSession =
msgReceiver.AcceptMessageSession();
BrokeredMessage message;
while ((message = msgSession.Receive()) != null)
{
// Process message
}
msgSession.Complete()
BrokeredMessage message = new BrokereMessage(content);
message.SessionId = "sessionId";
• Consume messages based on session id
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Group messages based on session
Message Splitter
MessageSession msgSession =
msgReceiver.AcceptMessageSession();
BrokeredMessage message;
while ((message = msgSession.Receive()) != null)
{
// Process message
}
msgSession.Complete()
BrokeredMessage message = new BrokereMessage(content);
message.SessionId = "sessionId";
• Consume messages based on session id
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Aggregator
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Aggregator
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Group messages based on session
Message Aggregator
BrokeredMessage message = new BrokereMessage(content);
message.SessionId = "sessionId";
• Use correlation id and filters
BrokereMessage message = new BrokereMessage(content);
message.CorrelationId = “CJ"
topic.Send(message);
namespaceManager.CreateSubscription(
“itcamp”,
“iquestsubscriptioncar”,
new CorrelationFilterExpression(“CJ"));
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Resequencer
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Resequencer
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Resequencer
Topic
Subscriptions
1
2
3
4
1
2
3
4
1234
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Resequencer
Topic
Subscriptions
1
2
3
4
1
2
3
4
3412
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Session, message index and message count
Message Resequencer
• Mark message as dead letter when in
incorrect order
• Iterate dead letter queue to access a
message with a lower index
BrokeredMessage message = new BrokereMessage(content);
message.Properties["index"] = 2;
message.Properties["count"] = 10
message.SessionId = “CJ-15-IQU";
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Resequencer
MessageSession messageSession =
queueClient.AcceptMessageSession();
int currentIndex = 1;
while(true)
{
BrokeredMessage message = messageSession.Receive();
if(int.Parse(message.Properties[“index”]) != currentIndex)
{
message.DeadLetter();
continue;
}
…
message.Complete();
if(int.Parse(messsage[“count”]) == currentIndex)
{
break;
}
currentIndex++;
}
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudMessage Recipient
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Use a property to specific the list of groups
Message Recipient
• Define custom filters using LIKE operator
BrokeredMessage message = new BrokeredMessage(content);
message.Properties[“groups”] = “orange magenta”;
SqlFilter filter = new SqlFilter(
“groups LIKE „%orange%‟”);
topic.AddSubscription(“subscription3”, filter);
• OR different properties for each group type
SqlFilter filter = new SqlFilter(
“EXISTS orange”);
topic.AddSubscription(“subscription3”, filter);
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Use a property to specific the list of groups
Message Recipient
• Define custom filters using LIKE operator
BrokeredMessage message = new BrokeredMessage(content);
message.Properties[“groups”] = “orange magenta”;
SqlFilter filter = new SqlFilter(
“groups LIKE „%orange%‟”);
topic.AddSubscription(“subscription3”, filter);
• OR different properties for each group type
• Use only one property and a prime number
for each group
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudContent-Based Router
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudContent-Based Router
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudScatter-Gather
Topic
Subscriptions
Queue
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudScatter-Gather
Topic
Subscriptions
Queue
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudDynamic Router
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudDynamic Router
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public CloudDynamic Router
Topic
Subscriptions
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• [key, values] properties
• Store properties
• Decorate properties
Dynamic Router
itcampro@ itcamp13# Premium conference on Microsoft technologies
COSTS, BENEFITS AND
LIMITATIONS
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• What are the costs of processing:
– 24kB message size
– 10M messages
– 1 Topic
- 8 hours
Costs
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• 10$ Sending
• 27.46$ Bandwidth (sending)
Costs
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• 10$ Sending
• 27.46$ Bandwidth (sending)
• 10 $ Receiving
• 0 $ Bandwidth (receiving)
Costs
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• 10$ Sending
• 27.46$ Bandwidth (sending)
• 10 $ Receiving
• 0 $ Bandwidth (receiving)
• 47.46$ Costs related to Service Bus
Costs
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• 10$ Sending
• 27.46$ Bandwidth (sending)
• 10 $ Receiving
• 0 $ Bandwidth (receiving)
• 47.46$ Costs related to Service Bus
• 8.64$ 4 Medium Worker Roles used to
consume messages
• 56.1$ Total cost
Costs
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Cheap
• 99.9% Uptime
• Extremely scalable and flexible
• No message is lost
• Filters and actions support
• REST API
• Death-letter and transaction support
• Same API for on-premise and cloud
Benefits
itcampro@ itcamp13# Premium conference on Microsoft technologies
Private &
Public Cloud
• Not for real-time application
• When processing more than 1M messages
on the same topic in a 30 minutes time
interval latency increases
• You need to pay for each send/receive
command
• Batch maximum size – 100 messages
Limitations
itcampro@ itcamp13# Premium conference on Microsoft technologies
Q & A
itcampro@ itcamp13# Premium conference on Microsoft technologies
THANK YOU

More Related Content

Similar to Messaging patterns in the cloud

Busy Developers Guide to AngularJS (Tiberiu Covaci)
Busy Developers Guide to AngularJS (Tiberiu Covaci)Busy Developers Guide to AngularJS (Tiberiu Covaci)
Busy Developers Guide to AngularJS (Tiberiu Covaci)ITCamp
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Enea Gabriel
 
ITCamp 2013 - Mihai Tataran - Building Autoscalable Azure Applications
ITCamp 2013 - Mihai Tataran - Building Autoscalable Azure ApplicationsITCamp 2013 - Mihai Tataran - Building Autoscalable Azure Applications
ITCamp 2013 - Mihai Tataran - Building Autoscalable Azure ApplicationsITCamp
 
How # (sharp) is Your Katana (Ciprian Jichici)
How # (sharp) is Your Katana (Ciprian Jichici)How # (sharp) is Your Katana (Ciprian Jichici)
How # (sharp) is Your Katana (Ciprian Jichici)ITCamp
 
The New Era of Code in the Cloud (Bogdan Toporan)
The New Era of Code in the Cloud (Bogdan Toporan)The New Era of Code in the Cloud (Bogdan Toporan)
The New Era of Code in the Cloud (Bogdan Toporan)ITCamp
 
ITCamp 2013 - Cristian Lefter - Transact-SQL from 0 to SQL Server 2012
ITCamp 2013 - Cristian Lefter - Transact-SQL from 0 to SQL Server 2012ITCamp 2013 - Cristian Lefter - Transact-SQL from 0 to SQL Server 2012
ITCamp 2013 - Cristian Lefter - Transact-SQL from 0 to SQL Server 2012ITCamp
 
ITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to StrengthenITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to StrengthenITCamp
 
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per dayITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per dayITCamp
 
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep diveITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep diveITCamp
 
Cloudbursting VDI Scenarios (Tiberiu Radu)
Cloudbursting VDI Scenarios (Tiberiu Radu)Cloudbursting VDI Scenarios (Tiberiu Radu)
Cloudbursting VDI Scenarios (Tiberiu Radu)ITCamp
 
ITCamp 2011 - Mihai Tataran - Migrating to Azure
ITCamp 2011 - Mihai Tataran - Migrating to AzureITCamp 2011 - Mihai Tataran - Migrating to Azure
ITCamp 2011 - Mihai Tataran - Migrating to AzureITCamp
 
ITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystemsITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystemsITCamp
 
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp
 
201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019Mark Tabladillo
 
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5ITCamp
 
Azure SQL Database From A Developer's Perspective - Alex Mang
Azure SQL Database From A Developer's Perspective - Alex MangAzure SQL Database From A Developer's Perspective - Alex Mang
Azure SQL Database From A Developer's Perspective - Alex MangITCamp
 
ITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - KeynoteITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - KeynoteITCamp
 
ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...
ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...
ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...ITCamp
 
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp
 
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp
 

Similar to Messaging patterns in the cloud (20)

Busy Developers Guide to AngularJS (Tiberiu Covaci)
Busy Developers Guide to AngularJS (Tiberiu Covaci)Busy Developers Guide to AngularJS (Tiberiu Covaci)
Busy Developers Guide to AngularJS (Tiberiu Covaci)
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
 
ITCamp 2013 - Mihai Tataran - Building Autoscalable Azure Applications
ITCamp 2013 - Mihai Tataran - Building Autoscalable Azure ApplicationsITCamp 2013 - Mihai Tataran - Building Autoscalable Azure Applications
ITCamp 2013 - Mihai Tataran - Building Autoscalable Azure Applications
 
How # (sharp) is Your Katana (Ciprian Jichici)
How # (sharp) is Your Katana (Ciprian Jichici)How # (sharp) is Your Katana (Ciprian Jichici)
How # (sharp) is Your Katana (Ciprian Jichici)
 
The New Era of Code in the Cloud (Bogdan Toporan)
The New Era of Code in the Cloud (Bogdan Toporan)The New Era of Code in the Cloud (Bogdan Toporan)
The New Era of Code in the Cloud (Bogdan Toporan)
 
ITCamp 2013 - Cristian Lefter - Transact-SQL from 0 to SQL Server 2012
ITCamp 2013 - Cristian Lefter - Transact-SQL from 0 to SQL Server 2012ITCamp 2013 - Cristian Lefter - Transact-SQL from 0 to SQL Server 2012
ITCamp 2013 - Cristian Lefter - Transact-SQL from 0 to SQL Server 2012
 
ITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to StrengthenITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
 
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per dayITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
 
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep diveITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
 
Cloudbursting VDI Scenarios (Tiberiu Radu)
Cloudbursting VDI Scenarios (Tiberiu Radu)Cloudbursting VDI Scenarios (Tiberiu Radu)
Cloudbursting VDI Scenarios (Tiberiu Radu)
 
ITCamp 2011 - Mihai Tataran - Migrating to Azure
ITCamp 2011 - Mihai Tataran - Migrating to AzureITCamp 2011 - Mihai Tataran - Migrating to Azure
ITCamp 2011 - Mihai Tataran - Migrating to Azure
 
ITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystemsITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystems
 
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
 
201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019
 
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
 
Azure SQL Database From A Developer's Perspective - Alex Mang
Azure SQL Database From A Developer's Perspective - Alex MangAzure SQL Database From A Developer's Perspective - Alex Mang
Azure SQL Database From A Developer's Perspective - Alex Mang
 
ITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - KeynoteITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
 
ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...
ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...
ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...
 
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
 
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...caitlingebhard1
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....rightmanforbloodline
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceIES VE
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 

Recently uploaded (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Messaging patterns in the cloud

  • 1. itcampro@ itcamp13# Premium conference on Microsoft technologies Messaging Patterns in the Cloud Radu Vunvulea iQuest Group @RaduVunvulea http://vunvulearadu.blogspot.com
  • 2. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudHuge thanks to our sponsors!
  • 3. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • World of Messages • On-Premise and Cloud solutions • Messaging Patterns • Costs, Benefits and Limitations Agenda
  • 4. itcampro@ itcamp13# Premium conference on Microsoft technologies WORLD OF MESSAGES
  • 5. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudWorld of Messages
  • 6. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudWorld of Messages
  • 7. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudWorld of Messages
  • 8. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudWorld of Messages
  • 9. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudWorld of Messages Message Message Message
  • 10. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudEnterprise Service Bus
  • 11. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudEnterprise Service Bus Interaction and communication between software applications
  • 12. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudEnterprise Service Bus Topic Subscriptions
  • 13. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudEnterprise Service Bus Topic Subscriptions
  • 14. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudEnterprise Service Bus Topic Subscriptions
  • 15. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudEnterprise Service Bus
  • 16. itcampro@ itcamp13# Premium conference on Microsoft technologies ON-PREMISE AND CLOUD SOLUTIONS
  • 17. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Pro – Open Source – Flexible – Good price – Transactional queue read/write – Flexible load distribution • Cons – No queue management – Document not up to date – Only one queue technology supported (MSMQ) NService Bus
  • 18. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Pro – Free for commercial use – Supports MSMQ and RabittMQ – Open Source – Good administration console • Cons – No commercial support – Not as fast as NServiceBus MassTransit
  • 19. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Pro – Scalable – Lots of features – Good administration console – Support – Cross platform and multiple environments • Cons – Is not free – Latency Azure Service Bus
  • 20. itcampro@ itcamp13# Premium conference on Microsoft technologies MESSAGING PATTERNS
  • 21. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Filter
  • 22. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Filter Topic Subscriptions
  • 23. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Custom rules based on message attributes • Add attributes to message Message Filter BrokeredMessage msg = new BrokeredMessage(messageContent); msg.Properties["colorCode"] = 1; • Create subscription with custom rule RuleDescription rule = new RuleDescription() { // 1 - green, 2 - orange Filter = new SqlFilter("colorCode = 1"); } namespaceManager.CreateSubscription( "itcamp", "greensubscription", rule);
  • 24. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Splitter
  • 25. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Splitter Topic Subscriptions
  • 26. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Group messages based on session Message Splitter MessageSession msgSession = msgReceiver.AcceptMessageSession(); BrokeredMessage message; while ((message = msgSession.Receive()) != null) { // Process message } msgSession.Complete() BrokeredMessage message = new BrokereMessage(content); message.SessionId = "sessionId"; • Consume messages based on session id
  • 27. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Group messages based on session Message Splitter MessageSession msgSession = msgReceiver.AcceptMessageSession(); BrokeredMessage message; while ((message = msgSession.Receive()) != null) { // Process message } msgSession.Complete() BrokeredMessage message = new BrokereMessage(content); message.SessionId = "sessionId"; • Consume messages based on session id
  • 28. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Aggregator
  • 29. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Aggregator Topic Subscriptions
  • 30. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Group messages based on session Message Aggregator BrokeredMessage message = new BrokereMessage(content); message.SessionId = "sessionId"; • Use correlation id and filters BrokereMessage message = new BrokereMessage(content); message.CorrelationId = “CJ" topic.Send(message); namespaceManager.CreateSubscription( “itcamp”, “iquestsubscriptioncar”, new CorrelationFilterExpression(“CJ"));
  • 31. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Resequencer
  • 32. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Resequencer
  • 33. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Resequencer Topic Subscriptions 1 2 3 4 1 2 3 4 1234
  • 34. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Resequencer Topic Subscriptions 1 2 3 4 1 2 3 4 3412
  • 35. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Session, message index and message count Message Resequencer • Mark message as dead letter when in incorrect order • Iterate dead letter queue to access a message with a lower index BrokeredMessage message = new BrokereMessage(content); message.Properties["index"] = 2; message.Properties["count"] = 10 message.SessionId = “CJ-15-IQU";
  • 36. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Resequencer MessageSession messageSession = queueClient.AcceptMessageSession(); int currentIndex = 1; while(true) { BrokeredMessage message = messageSession.Receive(); if(int.Parse(message.Properties[“index”]) != currentIndex) { message.DeadLetter(); continue; } … message.Complete(); if(int.Parse(messsage[“count”]) == currentIndex) { break; } currentIndex++; }
  • 37. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudMessage Recipient Topic Subscriptions
  • 38. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Use a property to specific the list of groups Message Recipient • Define custom filters using LIKE operator BrokeredMessage message = new BrokeredMessage(content); message.Properties[“groups”] = “orange magenta”; SqlFilter filter = new SqlFilter( “groups LIKE „%orange%‟”); topic.AddSubscription(“subscription3”, filter); • OR different properties for each group type SqlFilter filter = new SqlFilter( “EXISTS orange”); topic.AddSubscription(“subscription3”, filter);
  • 39. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Use a property to specific the list of groups Message Recipient • Define custom filters using LIKE operator BrokeredMessage message = new BrokeredMessage(content); message.Properties[“groups”] = “orange magenta”; SqlFilter filter = new SqlFilter( “groups LIKE „%orange%‟”); topic.AddSubscription(“subscription3”, filter); • OR different properties for each group type • Use only one property and a prime number for each group
  • 40. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudContent-Based Router Topic Subscriptions
  • 41. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudContent-Based Router Topic Subscriptions
  • 42. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudScatter-Gather Topic Subscriptions Queue
  • 43. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudScatter-Gather Topic Subscriptions Queue
  • 44. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudDynamic Router Topic Subscriptions
  • 45. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudDynamic Router Topic Subscriptions
  • 46. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public CloudDynamic Router Topic Subscriptions
  • 47. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • [key, values] properties • Store properties • Decorate properties Dynamic Router
  • 48. itcampro@ itcamp13# Premium conference on Microsoft technologies COSTS, BENEFITS AND LIMITATIONS
  • 49. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • What are the costs of processing: – 24kB message size – 10M messages – 1 Topic - 8 hours Costs
  • 50. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • 10$ Sending • 27.46$ Bandwidth (sending) Costs
  • 51. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • 10$ Sending • 27.46$ Bandwidth (sending) • 10 $ Receiving • 0 $ Bandwidth (receiving) Costs
  • 52. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • 10$ Sending • 27.46$ Bandwidth (sending) • 10 $ Receiving • 0 $ Bandwidth (receiving) • 47.46$ Costs related to Service Bus Costs
  • 53. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • 10$ Sending • 27.46$ Bandwidth (sending) • 10 $ Receiving • 0 $ Bandwidth (receiving) • 47.46$ Costs related to Service Bus • 8.64$ 4 Medium Worker Roles used to consume messages • 56.1$ Total cost Costs
  • 54. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Cheap • 99.9% Uptime • Extremely scalable and flexible • No message is lost • Filters and actions support • REST API • Death-letter and transaction support • Same API for on-premise and cloud Benefits
  • 55. itcampro@ itcamp13# Premium conference on Microsoft technologies Private & Public Cloud • Not for real-time application • When processing more than 1M messages on the same topic in a 30 minutes time interval latency increases • You need to pay for each send/receive command • Batch maximum size – 100 messages Limitations
  • 56. itcampro@ itcamp13# Premium conference on Microsoft technologies Q & A
  • 57. itcampro@ itcamp13# Premium conference on Microsoft technologies THANK YOU