SlideShare a Scribd company logo
1 of 33
Cloud Messaging with
NServiceBus and Microsoft Azure
Particular Webinar
Who we are
Mauro Servienti
CTO & Architect at Managed Designs, an IT company based in Italy. He is a
Microsoft MVP for Visual C# and a Particular Support engineer.
Sean Feldman
has been developing software professionally since 2001. He is Director of
Development at Travel Alberta and a Particular Support engineer.
Yves Goeleven
has been shipping enterprise and cloud software since 2001. He is a
Windows Azure MVP (4 years running), a developer at Particular Software
and founder of MessageHandler.net and a Particular Support engineer.
Agenda
• Introduction to Microsoft Azure;
• Moving to Microsoft Azure;
• The problems we need to face moving to the cloud;
• Introduction to messaging;
• NServiceBus and Microsoft Azure;
• Azure Transports Deep Dive;
• Particular Platform overview;
Introduction to Microsoft Azure
Microsoft Azure: concepts
• SaaS - Software as a Service: pay-as-you-go managed services to be consumed;
• Our responsibility: the configuration of the service;
• Scalability and availability: automatically handled by the infrastructure;
• Samples: Windows Media Services, Mobile Services, ServiceBus;
• PaaS - Platform as a Service: Managed stateless platform, abstracts the OS;
• Our responsibility: the business application development;
• Scalability and availability: on demand or automatic;
• Samples: Web Sites, Web Roles, Worker Roles;
• IaaS - Infrastructure as a Service: Managed state full VMs, abstracts the HW;
• Our responsibility: OS maintenance and business application installation, updates, backup;
• Scalability and availability: on demand, the installed application need to support it;
Microsoft Azure Data centers
• Azure data centers are huge:
• Lots of physical machines;
• Each physical machine hosting several Virtual Machine(s);
• Each Virtual machine hosting at least 1 «SaaS like service»;
• Each service is connected to the outside world and internally:
• Virtual Load Balancers
• Virtual Networks;
• We cannot rely on:
• Network reliability and availability;
• Low latency;
• Network topology being known and stable over time;
• «instances» are moved around by the Azure infrastructure;
Microsoft Azure SLA
• Hardware fails all the time: Physical servers fails;
• It’s something we don’t need to handle;
• It is something we need to care about;
• We need at least 2 instances of everything:
• Instance «1» fails, e.g. due to hardware failure, instance «1» is lost;
• Instance «2» is still servicing requests;
• Azure infrastructure will take care of re-imaging instance «1» for us;
• With at least 2 instances we have a highly available system;
Why Microsoft Azure
• Horizontal Scaling with Scale on demand:
• No need to be prepared to scale upfront from the infrastructure point of
view;
• No worries about hardware management:
• and long term costs;
• In general no worries about the infrastructure:
• from the Ops point of view;
• Pay as you go;
The problem we need to face
Moving to the cloud #1
Given that we have occasionally connected moving parts:
Web Frontend
Shipping
WCF Service
Standard RPC call to WCF
If the «Shipping» service fails, because the Azure instance fails:
• We can lose information;
• We need to handle failures and retries manually;
Moving to the cloud #2
Given that we have network with medium to high latency:
Web Frontend
Shipping
WCF Service
Standard RPC call to WCF
If the connection with «Shipping» service fails, is slow or timeouts:
• We can lose information;
• We slow down the whole system;
Introduction to messaging
A new scenario: async and distributed
• We have:
• occasionally connected systems;
• Moving and distributed parts;
• Non-reliable networks;
• We should not rely on RPC calls to drive the system;
Messages
A message can be shipped to a remote service via a queue
• Azure ServiceBus or Azure Queues
Web Frontend #1 Shipping Endpoint #1
Azure
ServiceBus
Web Frontend #2 Shipping Endpoint #2
competingconsumers
• If one endpoint fails messages will be picked by the other(s);
• On slow connections endpoints do not slow down the entire system;
Zoom in: Azure ServiceBus / Queues
• If the endpoint connects to another resource that fails we need to:
• Handle the failure;
• Handle the retry logic;
• Handle the retry count and decide what to after n failing retries;
• Handle how to reply back to the original sender to provide feedback;
Shipping EndpointAzure
ServiceBus
DB
NServiceBus and Microsoft Azure
We want to focus on business challenges, not Azure infrastructure
• NServiceBus will handle transport details for us
• Sending and receiving messages over
Azure Storage Queues and Azure ServiceBus
• Handling large/binary data with Azure Storage Blobs
• NServiceBus will handle retries and failures
• First Level Retries
• Second Level Retries
• Error queue
• NServiceBus will provide auditing
• Create audit messages
Why NServiceBus on Microsoft Azure?
Focus on What, not on How
Why NServiceBus on Microsoft Azure?
Long Running Processes in real life
Check-out
Order Items
Pick up
Ensure Items
In Stock
Bill customer
credit card
3rd party
billing service
Setup Order
cancellation
Timeout
Start item
collection
Order ready
to be shipped
Customer
credit card
billed
cancellation
Timeout
Elapsed
Order
Cancelled? yes
No
Cancel &
Complete
The order
Ship &
Complete
The order
UserRequest
Why NServiceBus on Microsoft Azure?
Long Running Processes
We want to focus on the processes, not Azure technicalities
• NServiceBus will implement Sagas on top of Azure:
• Azure closest equivalent would be a complex Worker Role;
• NServiceBus Saga Timeouts feature on Azure:
• Azure has no equivalent for Worker Role, custom timer operation;
• NServiceBus Saga Persistence is handled automatically:
• Azure has no equivalent for Worker Role, custom persistence code;
Why NServiceBus on Microsoft Azure?
Endpoints
We want Azure scaling model with NServiceBus easy hosting
• NServiceBus will provide endpoint hosting over Azure:
• For Web and Worker Roles;
• NServiceBus will allow to debug endpoints locally:
• With or without emulator;
• NServiceBus can host multiple endpoints in a single Role:
• Azure has no equivalent;
• Significant money saving;
Why NServiceBus on Microsoft Azure?
Meaningful Messaging
We want meaningful domain messages
• NServiceBus will decouple messages from infrastructure:
• Azure messages are transport / technical;
• NServiceBus will provide Commands and Events:
• Azure has generalized transport message only;
Case Study:
TRAVEL ALBERTA
Email Signup Service
Business Requirements
• Allow visitors signup / modify interest subscription / unsubscribe
• Never lose visitor information
Technical Requirements
• Integration with 3rd parties
• ExactTarget
• Support desk
• Account for service disruption that always happens
• Highly Available
• Minimal IT involvement
Lessons Learned
• Gradual learning curve (vs steep learning curve)
• Tooling for raw Azure is a challenge, possible solution Particular Platform
Azure Transports Deep Dive
2 Native transports
• Azure Storage Queues
• Azure ServiceBus
• Queue Peek Lock for retries instead of transactions;
• How to choose?
Azure Storage Queues
• Construct in storage system;
• Highly reliable (Cross DC);
• Very cheap;
• 500TB capacity limit;
• HTTP(s) based;
• TTL max 7 days;
Azure ServiceBus
• Real broker service;
• Reliable (within DC);
• Supports queues, topics, subscriptions;
• Loads of additional features;
• Dedupe, session, partitioning, deferral, dead-lettering, ordering, batching…
• 5GB capacity limit;
• TCP based (SBMP, AMQP), lower latency;
• TTL no limit;
• Relatively expensive*;
Persistence: What maps to what
• Subscriptions
• Table storage (for storage queues transport)
• Native subscriptions on topics (for azure ServiceBus transport)
• Sagas
• Table storage, 1 table per saga type
• Timeouts
• 2 tables, 2 queues & blob container for state
• Data bus
• Blob storage container
Crossing data centers boundaries
• We should be as near as possible to where the service is used;
• services in different Azure data centers;
• communication across data centers boundaries;
• Every endpoint instance can only listen to:
• 1 ServiceBus namespace or storage account;
• 1 queue;
• Message mappings:
• Allow us to specify “connection string”;
• Per assembly, namespace or per message
• We can send & subscribe across DC’s;
<add Assembly="VideoStore.Messages”
Namespace="VideoStore.Messages.Events”
Endpoint="VideoStore.Sales@otherconnectionstring" />
Particular Platform
Overview
Async & Distributed: monitoring
• When dealing with async and distributed messages monitoring is a
must have:
• we need to understand what is where;
• we need to understand what is going on;
• Monitoring must-have:
• Endpoints heartbeat;
• Message tracking;
• Sagas progress and tracking;
Particular Platform
ServicePulse
• Heartbeat;
• Custom Checks;
• Alerts;
• Failed endpoints
• Failed Messages;
ServiceInsight
• Message tracking;
• Message details;
• Sagas progress;
Q&A
Thanks to everyone

More Related Content

What's hot

[WSO2] Deployment Synchronizer for Deployment Artifact Synchronization Betwee...
[WSO2] Deployment Synchronizer for Deployment Artifact Synchronization Betwee...[WSO2] Deployment Synchronizer for Deployment Artifact Synchronization Betwee...
[WSO2] Deployment Synchronizer for Deployment Artifact Synchronization Betwee...
Kasun Gajasinghe
 
Productivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA TestersProductivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA Testers
WSO2
 
HotLink DR Express
HotLink DR ExpressHotLink DR Express
HotLink DR Express
dean1609
 
Keynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your businessKeynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your business
WSO2
 

What's hot (20)

[WSO2] Deployment Synchronizer for Deployment Artifact Synchronization Betwee...
[WSO2] Deployment Synchronizer for Deployment Artifact Synchronization Betwee...[WSO2] Deployment Synchronizer for Deployment Artifact Synchronization Betwee...
[WSO2] Deployment Synchronizer for Deployment Artifact Synchronization Betwee...
 
Adm02. IBM Connections Adminblast
Adm02. IBM Connections AdminblastAdm02. IBM Connections Adminblast
Adm02. IBM Connections Adminblast
 
Building out a Microservices Architecture with WebSphere Liberty Profile and ...
Building out a Microservices Architecture with WebSphere Liberty Profile and ...Building out a Microservices Architecture with WebSphere Liberty Profile and ...
Building out a Microservices Architecture with WebSphere Liberty Profile and ...
 
Hyper-V’s Virtualization Enhancements - EPC Group
Hyper-V’s Virtualization Enhancements - EPC GroupHyper-V’s Virtualization Enhancements - EPC Group
Hyper-V’s Virtualization Enhancements - EPC Group
 
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
 
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
 
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing WorkloaAAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and Docker
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and Docker
 
Best Practices for Deploying Microsoft Workloads on AWS
Best Practices for Deploying Microsoft Workloads on AWSBest Practices for Deploying Microsoft Workloads on AWS
Best Practices for Deploying Microsoft Workloads on AWS
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and Docker
 
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
 
Productivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA TestersProductivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA Testers
 
Deploy, Scale and Manage your Microsoft Investments with AWS
Deploy, Scale and Manage your Microsoft Investments with AWSDeploy, Scale and Manage your Microsoft Investments with AWS
Deploy, Scale and Manage your Microsoft Investments with AWS
 
HotLink DR Express
HotLink DR ExpressHotLink DR Express
HotLink DR Express
 
VMware Automation, PowerCLI presented at the Northern California PSUG
VMware Automation, PowerCLI presented at the Northern California PSUGVMware Automation, PowerCLI presented at the Northern California PSUG
VMware Automation, PowerCLI presented at the Northern California PSUG
 
Hybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM Bluemix
Hybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM BluemixHybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM Bluemix
Hybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM Bluemix
 
Setting Up a Hybrid Domino Environment to Ease your Way to the Cloud
Setting Up a Hybrid Domino Environment to Ease your Way to the CloudSetting Up a Hybrid Domino Environment to Ease your Way to the Cloud
Setting Up a Hybrid Domino Environment to Ease your Way to the Cloud
 
Keynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your businessKeynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your business
 

Similar to Cloud Messaging with NServiceBus and Microsoft Azure

iMobileMagic Teck Talk Scale Up
iMobileMagic Teck Talk Scale UpiMobileMagic Teck Talk Scale Up
iMobileMagic Teck Talk Scale Up
Pedro Machado
 

Similar to Cloud Messaging with NServiceBus and Microsoft Azure (20)

The impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenThe impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves Goeleven
 
NSBCon UK nservicebus on Azure by Yves Goeleven
NSBCon UK nservicebus on Azure by Yves GoelevenNSBCon UK nservicebus on Azure by Yves Goeleven
NSBCon UK nservicebus on Azure by Yves Goeleven
 
SAP on Azure Web Dispatcher High Availability
SAP on Azure Web Dispatcher High AvailabilitySAP on Azure Web Dispatcher High Availability
SAP on Azure Web Dispatcher High Availability
 
Cloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a CacheCloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a Cache
 
Serverless: The future of application delivery
Serverless: The future of application deliveryServerless: The future of application delivery
Serverless: The future of application delivery
 
iMobileMagic Teck Talk Scale Up
iMobileMagic Teck Talk Scale UpiMobileMagic Teck Talk Scale Up
iMobileMagic Teck Talk Scale Up
 
Building a [micro]services platform on AWS
Building a [micro]services platform on AWSBuilding a [micro]services platform on AWS
Building a [micro]services platform on AWS
 
Making communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service BusMaking communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service Bus
 
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su AzureSql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su Azure
 
High Availability of SAP ASCS in Microsoft Azure
High Availability of SAP ASCS in Microsoft AzureHigh Availability of SAP ASCS in Microsoft Azure
High Availability of SAP ASCS in Microsoft Azure
 
Scalability in cloud applications
Scalability in cloud applicationsScalability in cloud applications
Scalability in cloud applications
 
Building Real World Application with Azure
Building Real World Application with AzureBuilding Real World Application with Azure
Building Real World Application with Azure
 
Global Azure Bootcamp: Azure service fabric
Global Azure Bootcamp: Azure service fabric Global Azure Bootcamp: Azure service fabric
Global Azure Bootcamp: Azure service fabric
 
NServiceBus - introduction to a message based distributed architecture
NServiceBus - introduction to a message based distributed architectureNServiceBus - introduction to a message based distributed architecture
NServiceBus - introduction to a message based distributed architecture
 
Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...
Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...
Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...
 
Tokyo azure meetup #12 service fabric internals
Tokyo azure meetup #12   service fabric internalsTokyo azure meetup #12   service fabric internals
Tokyo azure meetup #12 service fabric internals
 
Azure service fabric overview
Azure service fabric overviewAzure service fabric overview
Azure service fabric overview
 
ECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASS
ECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASSECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASS
ECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASS
 
SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921
 
Multi cloud network leveraging sd-wan reference architecture
Multi cloud network leveraging sd-wan reference architectureMulti cloud network leveraging sd-wan reference architecture
Multi cloud network leveraging sd-wan reference architecture
 

More from Particular Software

More from Particular Software (20)

Scaling for Success: Lessons from handling peak loads on Azure with NServiceBus
Scaling for Success: Lessons from handling peak loads on Azure with NServiceBusScaling for Success: Lessons from handling peak loads on Azure with NServiceBus
Scaling for Success: Lessons from handling peak loads on Azure with NServiceBus
 
Beyond simple benchmarks—a practical guide to optimizing code
Beyond simple benchmarks—a practical guide to optimizing code Beyond simple benchmarks—a practical guide to optimizing code
Beyond simple benchmarks—a practical guide to optimizing code
 
An exception occurred - Please try again
An exception occurred - Please try againAn exception occurred - Please try again
An exception occurred - Please try again
 
Tales from the trenches creating complex distributed systems
Tales from the trenches  creating complex distributed systemsTales from the trenches  creating complex distributed systems
Tales from the trenches creating complex distributed systems
 
Got the time?
Got the time?Got the time?
Got the time?
 
Implementing outbox model-checking first
Implementing outbox   model-checking firstImplementing outbox   model-checking first
Implementing outbox model-checking first
 
Reports from the field azure functions in practice
Reports from the field   azure functions in practiceReports from the field   azure functions in practice
Reports from the field azure functions in practice
 
Finding your service boundaries - a practical guide
Finding your service boundaries - a practical guideFinding your service boundaries - a practical guide
Finding your service boundaries - a practical guide
 
Decomposing .NET Monoliths with NServiceBus and Docker
Decomposing .NET Monoliths with NServiceBus and DockerDecomposing .NET Monoliths with NServiceBus and Docker
Decomposing .NET Monoliths with NServiceBus and Docker
 
DIY Async Message Pump: Lessons from the trenches
DIY Async Message Pump: Lessons from the trenchesDIY Async Message Pump: Lessons from the trenches
DIY Async Message Pump: Lessons from the trenches
 
Share the insight of ServiceInsight
Share the insight of ServiceInsightShare the insight of ServiceInsight
Share the insight of ServiceInsight
 
What to consider when monitoring microservices
What to consider when monitoring microservicesWhat to consider when monitoring microservices
What to consider when monitoring microservices
 
Making communications across boundaries simple with NServiceBus
Making communications across boundaries simple with NServiceBusMaking communications across boundaries simple with NServiceBus
Making communications across boundaries simple with NServiceBus
 
How to avoid microservice pitfalls
How to avoid microservice pitfallsHow to avoid microservice pitfalls
How to avoid microservice pitfalls
 
Connect front end to back end using SignalR and Messaging
Connect front end to back end using SignalR and MessagingConnect front end to back end using SignalR and Messaging
Connect front end to back end using SignalR and Messaging
 
Async/Await: NServiceBus v6 API Update
Async/Await: NServiceBus v6 API UpdateAsync/Await: NServiceBus v6 API Update
Async/Await: NServiceBus v6 API Update
 
Async/Await: TPL & Message Pumps
Async/Await: TPL & Message Pumps Async/Await: TPL & Message Pumps
Async/Await: TPL & Message Pumps
 
Async/Await Best Practices
Async/Await Best PracticesAsync/Await Best Practices
Async/Await Best Practices
 
Making workflow implementation easy with CQRS
Making workflow implementation easy with CQRSMaking workflow implementation easy with CQRS
Making workflow implementation easy with CQRS
 
Cqrs but different
Cqrs but differentCqrs but different
Cqrs but different
 

Recently uploaded

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 

Cloud Messaging with NServiceBus and Microsoft Azure

  • 1. Cloud Messaging with NServiceBus and Microsoft Azure Particular Webinar
  • 2. Who we are Mauro Servienti CTO & Architect at Managed Designs, an IT company based in Italy. He is a Microsoft MVP for Visual C# and a Particular Support engineer. Sean Feldman has been developing software professionally since 2001. He is Director of Development at Travel Alberta and a Particular Support engineer. Yves Goeleven has been shipping enterprise and cloud software since 2001. He is a Windows Azure MVP (4 years running), a developer at Particular Software and founder of MessageHandler.net and a Particular Support engineer.
  • 3. Agenda • Introduction to Microsoft Azure; • Moving to Microsoft Azure; • The problems we need to face moving to the cloud; • Introduction to messaging; • NServiceBus and Microsoft Azure; • Azure Transports Deep Dive; • Particular Platform overview;
  • 5. Microsoft Azure: concepts • SaaS - Software as a Service: pay-as-you-go managed services to be consumed; • Our responsibility: the configuration of the service; • Scalability and availability: automatically handled by the infrastructure; • Samples: Windows Media Services, Mobile Services, ServiceBus; • PaaS - Platform as a Service: Managed stateless platform, abstracts the OS; • Our responsibility: the business application development; • Scalability and availability: on demand or automatic; • Samples: Web Sites, Web Roles, Worker Roles; • IaaS - Infrastructure as a Service: Managed state full VMs, abstracts the HW; • Our responsibility: OS maintenance and business application installation, updates, backup; • Scalability and availability: on demand, the installed application need to support it;
  • 6. Microsoft Azure Data centers • Azure data centers are huge: • Lots of physical machines; • Each physical machine hosting several Virtual Machine(s); • Each Virtual machine hosting at least 1 «SaaS like service»; • Each service is connected to the outside world and internally: • Virtual Load Balancers • Virtual Networks; • We cannot rely on: • Network reliability and availability; • Low latency; • Network topology being known and stable over time; • «instances» are moved around by the Azure infrastructure;
  • 7. Microsoft Azure SLA • Hardware fails all the time: Physical servers fails; • It’s something we don’t need to handle; • It is something we need to care about; • We need at least 2 instances of everything: • Instance «1» fails, e.g. due to hardware failure, instance «1» is lost; • Instance «2» is still servicing requests; • Azure infrastructure will take care of re-imaging instance «1» for us; • With at least 2 instances we have a highly available system;
  • 8. Why Microsoft Azure • Horizontal Scaling with Scale on demand: • No need to be prepared to scale upfront from the infrastructure point of view; • No worries about hardware management: • and long term costs; • In general no worries about the infrastructure: • from the Ops point of view; • Pay as you go;
  • 9. The problem we need to face
  • 10. Moving to the cloud #1 Given that we have occasionally connected moving parts: Web Frontend Shipping WCF Service Standard RPC call to WCF If the «Shipping» service fails, because the Azure instance fails: • We can lose information; • We need to handle failures and retries manually;
  • 11. Moving to the cloud #2 Given that we have network with medium to high latency: Web Frontend Shipping WCF Service Standard RPC call to WCF If the connection with «Shipping» service fails, is slow or timeouts: • We can lose information; • We slow down the whole system;
  • 13. A new scenario: async and distributed • We have: • occasionally connected systems; • Moving and distributed parts; • Non-reliable networks; • We should not rely on RPC calls to drive the system;
  • 14. Messages A message can be shipped to a remote service via a queue • Azure ServiceBus or Azure Queues Web Frontend #1 Shipping Endpoint #1 Azure ServiceBus Web Frontend #2 Shipping Endpoint #2 competingconsumers • If one endpoint fails messages will be picked by the other(s); • On slow connections endpoints do not slow down the entire system;
  • 15. Zoom in: Azure ServiceBus / Queues • If the endpoint connects to another resource that fails we need to: • Handle the failure; • Handle the retry logic; • Handle the retry count and decide what to after n failing retries; • Handle how to reply back to the original sender to provide feedback; Shipping EndpointAzure ServiceBus DB
  • 17. We want to focus on business challenges, not Azure infrastructure • NServiceBus will handle transport details for us • Sending and receiving messages over Azure Storage Queues and Azure ServiceBus • Handling large/binary data with Azure Storage Blobs • NServiceBus will handle retries and failures • First Level Retries • Second Level Retries • Error queue • NServiceBus will provide auditing • Create audit messages Why NServiceBus on Microsoft Azure? Focus on What, not on How
  • 18. Why NServiceBus on Microsoft Azure? Long Running Processes in real life Check-out Order Items Pick up Ensure Items In Stock Bill customer credit card 3rd party billing service Setup Order cancellation Timeout Start item collection Order ready to be shipped Customer credit card billed cancellation Timeout Elapsed Order Cancelled? yes No Cancel & Complete The order Ship & Complete The order UserRequest
  • 19. Why NServiceBus on Microsoft Azure? Long Running Processes We want to focus on the processes, not Azure technicalities • NServiceBus will implement Sagas on top of Azure: • Azure closest equivalent would be a complex Worker Role; • NServiceBus Saga Timeouts feature on Azure: • Azure has no equivalent for Worker Role, custom timer operation; • NServiceBus Saga Persistence is handled automatically: • Azure has no equivalent for Worker Role, custom persistence code;
  • 20. Why NServiceBus on Microsoft Azure? Endpoints We want Azure scaling model with NServiceBus easy hosting • NServiceBus will provide endpoint hosting over Azure: • For Web and Worker Roles; • NServiceBus will allow to debug endpoints locally: • With or without emulator; • NServiceBus can host multiple endpoints in a single Role: • Azure has no equivalent; • Significant money saving;
  • 21. Why NServiceBus on Microsoft Azure? Meaningful Messaging We want meaningful domain messages • NServiceBus will decouple messages from infrastructure: • Azure messages are transport / technical; • NServiceBus will provide Commands and Events: • Azure has generalized transport message only;
  • 23. Email Signup Service Business Requirements • Allow visitors signup / modify interest subscription / unsubscribe • Never lose visitor information Technical Requirements • Integration with 3rd parties • ExactTarget • Support desk • Account for service disruption that always happens • Highly Available • Minimal IT involvement Lessons Learned • Gradual learning curve (vs steep learning curve) • Tooling for raw Azure is a challenge, possible solution Particular Platform
  • 25. 2 Native transports • Azure Storage Queues • Azure ServiceBus • Queue Peek Lock for retries instead of transactions; • How to choose?
  • 26. Azure Storage Queues • Construct in storage system; • Highly reliable (Cross DC); • Very cheap; • 500TB capacity limit; • HTTP(s) based; • TTL max 7 days;
  • 27. Azure ServiceBus • Real broker service; • Reliable (within DC); • Supports queues, topics, subscriptions; • Loads of additional features; • Dedupe, session, partitioning, deferral, dead-lettering, ordering, batching… • 5GB capacity limit; • TCP based (SBMP, AMQP), lower latency; • TTL no limit; • Relatively expensive*;
  • 28. Persistence: What maps to what • Subscriptions • Table storage (for storage queues transport) • Native subscriptions on topics (for azure ServiceBus transport) • Sagas • Table storage, 1 table per saga type • Timeouts • 2 tables, 2 queues & blob container for state • Data bus • Blob storage container
  • 29. Crossing data centers boundaries • We should be as near as possible to where the service is used; • services in different Azure data centers; • communication across data centers boundaries; • Every endpoint instance can only listen to: • 1 ServiceBus namespace or storage account; • 1 queue; • Message mappings: • Allow us to specify “connection string”; • Per assembly, namespace or per message • We can send & subscribe across DC’s; <add Assembly="VideoStore.Messages” Namespace="VideoStore.Messages.Events” Endpoint="VideoStore.Sales@otherconnectionstring" />
  • 31. Async & Distributed: monitoring • When dealing with async and distributed messages monitoring is a must have: • we need to understand what is where; • we need to understand what is going on; • Monitoring must-have: • Endpoints heartbeat; • Message tracking; • Sagas progress and tracking;
  • 32. Particular Platform ServicePulse • Heartbeat; • Custom Checks; • Alerts; • Failed endpoints • Failed Messages; ServiceInsight • Message tracking; • Message details; • Sagas progress;

Editor's Notes

  1. ASQ or ASB? Do I want high message throughput or extremely low cost. Do I care about limitation on size of message per transport or just send my binary/large data? Do I need to re-invent the wheel of custom retry logic and spend time on perfecting it or spend time on solving my business challenge?