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

Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
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
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 

Recently uploaded (20)

Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
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
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 

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