Download presentation
Presentation is loading. Please wait.
Published byJudith Rodgers Modified over 9 years ago
1
Driving the Azure Service Bus Scott Klueppel Solutions Architect SOAlutions, Inc. #jaxcodeimpact @kloopdogg
2
- Feature Overview - Management Portal / Tools - Relayed vs. Brokered Messaging - Cloud Design Patterns - Building Hybrid/Cross-Platform Systems Azure Service Bus Agenda
3
Azure Service Bus Feature Overview Management Portal Tools
4
- Cross-platform middleware - Unified set of messaging capabilities - Request/Response - One-way - Queued - Publish/Subscribe Azure Service Bus What is the Service Bus?
5
Windows Azure SDK Visual Studio 2013 Visual Studio 2012 Visual Studio 2010 2.4 Aug2014Supported Not Supported 2.3 Apr2014Supported Not Supported 2.2 Oct2013Supported Not Supported 2.1 Jul2013Not SupportedSupported - SDK contains client libraries - MS Committed to backwards compatibility Azure Service Bus Windows Azure SDK
6
Demo Management Portal Tools
7
Relayed Messaging Features Demo
8
-A centralized service that offers connectivity options for clients and servers communicating in challenging network scenarios -Permits one-way, request/response messaging -Supports SOAP, WS-*, optimized for WCF -Service hosts are “Listeners” -Clients only call the relay service What is a relay? Relays
9
On-Premise How does it work? Relays WCF Service Remote Client Service Bus Send Shared Secret Return Token 1 2 Open Relay Connection 3 Send Shared Secret Return Token 4 5 Send message 6 Deliver message 8 Relay message (load balancing) 7 Access Control Service
10
FirewallNAT Firewall Corporate Relays Scenario 1: Network Infrastructure Client On-Premise Web App Other Service Dynamic IPs No LB/ACE Relay WCF Service
11
FirewallNAT Firewall Corporate Relays Scenario 2: Emergency Use Client On-Premise Web App Other Service Relay WCF Service
12
FirewallNAT Firewall Corporate. Relays Scenario 3: Roaming Devices Client On-Premise Web App Other Service Coffee Shop. Client Relay WCF Service
13
1.If there are no listeners, the service is unavailable 2.No automatic scaling for high bursts of traffic 3.Load balancing is not configurable 4.Ports 9350-9353 (outbound only) Considerations Relays
14
Demo Convert to Relay Load balancing
15
Brokered Messaging Features Demos
16
- Sender makes asynchronous calls - Messages are durably stored in a broker - Broker holds messages until receiver is available - Ideal for distributed or occasionally- connected systems - Service Bus offers queues and topics … and soon event hubs What is brokered messaging?
17
- Messages are durably stored until consumed - Messages pulled from queue by one or more competing consumers - Benefits: - Temporal decoupling - Load leveling - Load balancing Queues
18
- Messages are durably stored until consumed - Messages are sent to one or more subscriptions - Messages pulled from subscriptions by one or more competing consumers - Benefits: - Temporal decoupling - Load leveling - Load balancing Topics (and Subscriptions) Topics
19
Client Topic Service Sub {color=red} Sub {true} Service Queues Topics (with subscriptions) Show me the messages Client Queue Service
20
Queues namespaceManager.CreateQueue("issues"); Topics namespaceManager.CreateTopic("telemetry-ingestion"); Subscriptions namespaceManager.CreateSubscription( "telemetry-ingestion", // topic name "Dashboard", // subscription name new SqlFilter("Color = 'red'")); // filter (optional) Creating broker objects
21
- Body (object or stream) - Properties (KVP) - Has two primary constructors: BrokeredMessage() - Empty body BrokeredMessage(object) - Object must be serializable (uses DataContractSerializer) The BrokeredMessage class
22
1.Poll using “Receive” operations (client API) 2.Use messaging bindings with a WCF service Receiving Brokered Messages
23
- Create a queue client - Send a message - Receive a message Using queues Queues TimeSpan receiveTimeout = TimeSpan.FromSeconds(5); while ((message = queueClient.Receive(receiveTimeout)) != null) { //TODO: Do work message.Complete(); } BrokeredMessage issueMsg = new BrokeredMessage(issue); queueClient.Send(issueMsg); var uri = ServiceBusEnvironment.CreateServiceUri("sb", namespace, String.Empty); TokenProvider credentials = TokenProvider.CreateSharedSecretTokenProvider(IssuerName, IssuerKey); MessagingFactory factory = MessagingFactory.Create(uri, credentials); QueueClient queueClient = factory.CreateQueueClient("TestQueue");
24
- Send a message - Receive a message Using topics MessagingFactory factory = MessagingFactory.Create(uri, credentials); SubscriptionClient subscriptionClient = factory.CreateSubscriptionClient(topicName, subscriptionName); TimeSpan receiveTimeout = TimeSpan.FromSeconds(5); while ((message = subscriptionClient.Receive(receiveTimeout)) != null) { //TODO: Do work message.Complete(); } MessagingFactory factory = MessagingFactory.Create(uri, credentials); TopicClient topicClient = factory.CreateTopicClient(topicName); BrokeredMessage issueMsg = new BrokeredMessage(issue); topicClient.Send(issueMsg); Topics
25
- Auto-forwarding topics and queues - Improves overall performance Auto-forwarding Client Topic Subscriptio n Topic Subscriptio n Auto-forwarding Scale out for more overall subscriptions Queue Topic Auto-forwarding Fan in from several queues Client Queue Client Topic Queue Subscriptio n Queue Subscriptio n Auto-forwarding Forward to (maybe delayed) processing queues
26
-Use SBMP over HTTP -Reuse clients → fewer connections -Client-side batching (async only) -Express queues/topics -Partitioning → distributed internal store Squeezing Performance
27
Demo Queues Topics
28
Patterns at Work Queue-Based Load Leveling Priority Queues
29
-Maximize availability -Increased scalability -Control costs Queue-Based Load Leveling
30
-Prioritization of message processing -Maximize performance -Minimize operational costs Priority Queue
31
Cross-Platform AMQP Devices
32
Azure Service Bus Multiple Protocol Support Service Bus Protocols - SBMP High performance.NET/Windows only - HTTP Lower performance High reach - AMQP High performance High reach
33
Azure Service Bus AMQP -Enables cross-platform systems to be built using brokers and frameworks from different vendors -Open, standard messaging protocol - OASIS AMQP 1.0 Standard (in progress since 2008, completed in 2013) -Service Bus.NET Client Library (C#) -Apache Qpid JMS/IIT SwiftMQ (Java) -Apache Qpid Proton (C, PHP, Python)
34
Azure Service Bus Use Case: Sensors/Devices ZigBee Radio Solar Cell(s) Batteries Sensors -Temperature -Moisture -Light -Sound Coordinator AMQP Ingestion / Analysis
35
Azure Service Bus Event Hubs (Preview) -Facilitates cloud-scale ingestion - Telemetry data - Events -Millions of events per second (up to 1 GB/s) -Support for AMQP and HTTP -Each partition - 1MB/s ingress and 2MB/s egress - Needs exactly one dedicated worker process
36
Demo AMQP Linux/Python
37
What did we talk about? -Azure Service Bus Features -Some cloud design patterns -Cross-platform goodness
38
code.org Programming for any age
39
Questions? #jaxcodeimpact @kloopdogg Scott Klueppel Solutions Architect SOAlutions, Inc.
40
References Cloud Design Patterns (P&P) http://msdn.microsoft.com/en-us/library/dn568099.aspx http://msdn.microsoft.com/en-us/library/dn568099.aspx Apache Qpid Proton http://qpid.apache.org/proton/ http://qpid.apache.org/proton/
41
Thank you! #jaxcodeimpact @kloopdogg Scott Klueppel Solutions Architect SOAlutions, Inc.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.