SlideShare a Scribd company logo
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 v2
Enea 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 2019
Mark 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 Mang
ITCamp
 
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 Resources
ITCamp
 
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

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 

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