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

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Dernier

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
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 organizationRadu Cotescu
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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...Miguel Araújo
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

Dernier (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

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