service bus sender receiver frontend nodes ctrl forwarder outbound socket connect outbound socket...

55
Building Hybrid Applications using the Azure Service Bus David Ingham Senior Program Manager, Service Bus Team 3-033

Upload: terry-sinnott

Post on 29-Mar-2015

224 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Building Hybrid Applications using the Azure Service BusDavid InghamSenior Program Manager, Service Bus Team3-033

Page 2: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Service Bus overview Recent developments with SDK 1.8Service Bus for Windows ServerCross-platform hybrid apps

Agenda

Page 3: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Unified set of messaging capabilities Consistent management and observation capabilities

Service Bus RelayRich options for interconnecting apps across network boundaries

Service Bus Brokered MessagingQueuing, publish/subscribe

Easily build hybrid apps

What is Service Bus?

Page 4: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Service Bus Relay

Service Bus

Sender Receiver

Frontend Nodes

Ctrl

Forwarderou

tbou

nd

sock

et

connec

t

outbound

socket

rendezvous

Ctrl

NLB

• Integrated w/ WCF programming model

• Using Outbound Connections Only

• No open inbound firewall/NAT ports

• Outbound connections default to TCP

• Fall back to HTTP when needed

• Guarded by Datacenter Firewall

• Secured with Access Control

Page 5: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Showcasing Service Bus Relay

DemoRemoting a WCF service

Audience Participationhttp://tinyurl.com/sbrelay

Page 6: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Message queuing (Queues)Publish/subscribe (Topics, Subscriptions)Enables loosely-coupling

Service Bus Brokered Messaging

Page 7: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Tightly Coupled

Store Front End

Drivers

Shipping Service

Tracking

Page 8: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Store Front End

Shipping Service

Drivers

Tracking

Tightly Coupled

Page 9: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Store Front End

Drivers

Shipping Service

Tracking

Order Queue

Loosely Coupled

Page 10: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Store Front End

Order Queue Shipping Service

Drivers

Tracking

Loosely Coupled

Page 11: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Store Front End

Order Queue Shipping Service

Drivers

Tracking

Loosely Coupled

Page 12: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Store Front End

Order Queue

Tracking

Tracking

Shipping Service

Loosely Coupled

Page 13: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Service Bus Queue

QueueS R

S

S

R

R

Sequential message log with shared cursor and locksCan have competing consumersEach message published is consumed by a single consumer

Page 14: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Service Bus Topic

S

S

S

Sequential message log; each subscription has own lock/cursorSubscribers can filter, based on message propertiesEach message published is available to each subscription

Topic

SubsR

R

RR

R

Page 15: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

PropertiesKey/value pairs exposed to the brokerSubscription rules can filter based on properties

BodyOpaque payload not exposed to the brokerCan be used for encrypted data

BrokeredMessage

Brokered Message

Body

Properties

Key Value

Key Value

Key Value

Key Value

Body

Page 16: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Showcasing Service Bus Brokered Messaging

DemoMartVue: Retail Insight In Real Time

Page 17: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Retail Points of Sale

Inventory and Fulfillment

Centers

Business Operations

Real Time Retail

Analytics

?

Page 18: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Store Queue

Service Bus

Inventory

Page 19: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Store Queue

Service Bus

Inventory

Load Leveling

Page 20: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Store Queue

Service Bus

Inventory

Store

Store

Store

Load BalancingInventor

y

Page 21: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

StoreData Collection

Topic

Service Bus

InventorySub

Sub

Audit

Audit Taps

Page 22: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

StoreData Collection

Topic

Service Bus

InventorySub

Sub

Audit

Sub

Dashboard

Real-Time Observation

Page 23: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

StoreData Collection

Topic

Service Bus

InventorySub

Sub

Audit

Sub

Dashboard

Sub

MartVue Analyzer

Analysis Topic Sub

Real-Time Analysis

Page 24: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

StoreData Collection

Topic

Service Bus

InventorySub

Sub

Audit

Sub

Dashboard

Sub

MartVue Analyzer

Analysis Topic Sub

Catalog TopicSub

Scale-OutEventing

Page 25: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

New Service Bus features inWindows Azure SDK 1.8

Page 26: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Message auto-forwardingLink together queues & topics Build rich messaging flowsScale out topicsFan-in from several queuesReduce coupling

QueueDescription destinationQ = new QueueDescription("myQ2");QueueDescription sourceQ = new QueueDescription("myQ1");sourceQ.ForwardTo = “myQ2";

Page 27: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Supports long running workflowsMaximum lock duration is 5 minutesCan renew lock repeatedly

Message lock renewal

QueueClient queueClient = QueueClient.Create("myQ");BrokeredMessage message = queueClient.Receive();message.RenewLock(); message.LockedUntilUtc; // check to see when you need to renew

Page 28: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Pause queues & topics

Useful in multi-tenant appsSend ops blocked for disabled queues and topicsReceive ops blocked for disabled queues and subscriptions

QueueDescription qd = namespaceManager.GetQueue("myQ");qd.Status = EntityStatus.Disabled;namespaceManager.UpdateQueue(qd);qd.Status = EntityStatus.Active;namespaceManager.UpdateQueue(qd);

Page 29: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Send-time filter evaluationEvaluate filters at the time of message sendWarn if no subscriptions matchWorks with all types of filters

TopicDescription td = new TopicDescription("Topic");td.EnableFilteringMessagesBeforePublishing = true;// throws NoMatchingSubscriptionException on send

Page 30: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Improved monitoring

View details of “sub queues”Active, dead-letter, scheduled, transfer queues

Available as part of Description objects

NamespaceManager nm = NamespaceManager.Create();QueueDescription myQ = nm.GetQueue("myQ");var active = myQ.MessageCountDetails.ActiveMessageCount;var deadLettered = myQ.MessageCountDetails.DeadLetterMessageCount;var scheduled = myQ.MessageCountDetails.ScheduledMessageCount;var transfer = myQ.MessageCountDetails.TransferMessageCount;

Page 31: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

New API capabilities in SDK 1.8 Message lock renewalMessage auto-forwardingPause entitiesSend-time filter evaluationsImproved monitoringBatching APIs for sending and receiving groups of messagesConsistent send of messages to multiple entitiesSession browsing

Page 32: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Service Bus for Windows Server

Page 33: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

On-premises messaging scenarioWhy & What

On-Premises pub-sub •Enterprise applications developed and deployed on-premise.•Scale ; HA ; Manageability ; Rich messaging feature set

Develop On-premise •High fidelity develop, test, debug experience•DevBox deployment (HW&SF pre-reqs) ; Tools (VS); debug mode ; symmetry

Flexible Deployment•Driven by enterprise desire for deployment choice•Full symmetry ; Ease of migration

Tiered Deployment •Maintain control of mission critical data / systems•Unable/unwilling to migrate legacy systems•Gradual migration to cloud•Message Federation

On-premise

Cloud

Deploy

DeployDeploy

DataApp

Develop

Develop&Deploy

Page 34: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Cloud and on-premise symmetryGet the connection string from the ConfigWizard or the following cmdLet:

string connectionString = ConfigurationManager.AppSettings["Microsoft.ServiceBus.ConnectionString"];MessagingFactory factory = MessagingFactory.CreateFromConnectionString(connectionString);NamespaceManager namespaceManager = NamespaceManager.CreateFromConnectionString(connectionString);

<appSettings> <add key="Microsoft.ServiceBus.ConnectionString" value="Endpoint=sb://hostName/ServiceBusDefaultNamespace;

StsEndpoint=https://hostName:9355/ServiceBusDefaultNamespace; RuntimePort=9354;ManagementPort=9355"/> </appSettings>

PS C:\Program Files\Service Bus\1.0> Get-SBClientConfigurationEndpoint=sb://hostName/ServiceBusDefaultNamespace; StsEndpoint=https://hostName:9355/ServiceBusDefaultNamespace; RuntimePort=9354;ManagementPort=9355

Paste it in to your configuration file:

Use it in your code:

Page 35: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Cross-platform hybrid apps

Page 36: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Message-oriented middleware allows application modules to be distributed over heterogeneous platforms and reduces the complexity of developing applications that span multiple operating systems …

--Wikipedia’s entry for message-oriented middleware

Page 37: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Difficult to port applicationsRequires re-coding all applications

Difficult to integrateApplication level bridges to move messages and translate message formats

Restricted platform supportLimited to whatever vendor provides

Proprietary messaging protocols

Page 38: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Open, standard messaging protocolEnables cross-platform apps to be built using brokers, libraries and frameworks from different vendors

FeaturesEfficient – binary connection-oriented protocolReliable – fire-and-forget to reliable, exactly-once deliveryPortable data representation – cross-platform, full-fidelity exchangeFlexible – client-client, client-broker, and broker-broker topologiesBroker-model independent – no requirements on broker internals

Advanced Message Queuing Protocol 1.0

Page 39: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

This week OASIS announced the ratification of the AMQP 1.0 StandardSoftware vendors and end-users can bet on AMQP 1.0 knowing it’s a stable, well-supported protocol standardThe culmination of several years effort by more than 20 companiesTechnology vendors: Axway Software, Huawei Technologies, IIT Software, INETCO Systems, Kaazing, Microsoft, Mitre Corporation, Primeton Technologies, Progress Software, Red Hat, SITA, Software AG, Solace Systems, VMware, WSO2, Zenika. User firms: Bank of America, Credit Suisse, Deutsche Boerse, Goldman Sachs, JPMorgan Chase.

Announcement:

OASIS AMQP 1.0 Standard released

Page 40: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

“AMQP 1.0 is a novel addition to the growing toolkit of open protocols for transporting data between systems and virtualized application delivery. Standard transports enable lower cost business integration and messaging. AMQP 1.0 admits many use cases by defining safe message transfer between peers, without the constraint of a message broker model. With its open license, we anticipate both AMQP's wide adoption by messaging servers, and its use as a new API for database and integration products.”

--Alexis Richardson, Senior Director

VMware

Page 41: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

“Red Hat is pleased to see the hard work of the Technical Committee come to fruition. We are a founding member of the AMQP Technical Committee and have been active on the specification since the early days. AMQP 1.0 represents a significant improvement in the messaging arena and we expect to continue to support it in our products to best customer needs.”

-- Mark Little, Vice President, Middleware Engineering

Red Hat

Page 42: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

“A platform independent and vendor neutral protocol like AMQP removes hurdles in advancing interoperability of message-oriented middleware technologies. As a founding sponsor member of the AMQP TC and the related AMQP Steering Committee, Software AG is very pleased to see AMQP 1.0 transition to an OASIS Standard. Software AG supports numerous standards in its product suite, and AMQP has been an important addition to webMethods Nirvana, increasing interoperability and providing advanced messaging capabilities to our customers.”

-- Prasad Yendluri, VP & Deputy CTO

SoftwareAG

Page 43: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

“As the enablers of the Living Web and HTML5 WebSocket technology, everyone at Kaazing is excited to support OASIS' ongoing efforts to proliferate open standards and create a superior user web experience. Standardizing AMQP and combining it with WebSocket technology is an excellent strategy when building an event driven architecture. Working alongside OASIS, Kaazing has developed a Living Web in order to create the best possible web experience for users, reduce complexity, and increase interoperability.”

-- John Fallows, CTO and Co-Founder

Kaazing

Page 44: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

“Microsoft congratulates the AMQP community on approval of AMQP version 1.0 as an OASIS Standard. As an open and interoperable messaging protocol that can scale from mobile clients to the cloud, AMQP has benefitted from the participation of technical experts from around the world, and the achievement of this important milestone will lead to continued growth in the AMQP ecosystem. We look forward to working with the community to promote AMQP-based interoperability and innovation.”

-- Scott Guthrie, Corporate VP, Microsoft's Server and Tools Business Division

Microsoft

Page 45: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

AMQP 1.0 preview available today in Azure Service BusUpdated Service Bus client library availableSupport for a range of third-party client librariesMore platforms will be supported as libraries become availableGeneral availability in H1 2013

Announcement:

Service Bus AMQP 1.0 preview

Page 46: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Support for multiple protocols

“SBMP”high perf..NET only

AMQP 1.0high perf

high reach

HTTPhigh reachlower perf.

App ( any language

)Community Libs

AMQP 1.0Any OS

App ( .NET )

SB .NET Lib“SBMP”Windows

App ( any language

)SB Wrappers

HTTPAny OS

.NET, Node.js, Java, PHP, Python

Page 47: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

AMQP 1.0 client libraries

Language Library

C# Service Bus .NET Client Library

Java Apache Qpid Java Message Service (JMS) clientIIT SwiftMQ Java client

C Apache Qpid Proton-C

PHP Apache Qpid Proton-PHP

Python Apache Qpid Proton-Python

Ruby Apache Qpid Proton-Ruby (coming soon)

Perl Apache Qpid Proton-Perl (coming soon)

JavaScript Apache Qpid Proton-JavaScript (coming soon)

Page 48: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Showcasing support for cross-platform hybrid apps using Service Bus and AMQP 1.0

DemoPictureMagic

Page 49: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Transform Requests

Topic

Subs

RQ

Image Transforme

rApp

ClientApp

MessageId = 1234ReplyTo = RQ

MessageId = 5678CorrelationId = 1234

Page 50: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Service Bus

Transform Requests

Topic

Win

dow

s (o

n-p

rem

)Li

nux

(Azu

re)

Archiver

Monitor

Transformer

Twitter

SwiftMQBroker

Page 51: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

SummaryService Bus provides a unified set of messaging capabilitiesWindows RT client library available nowNew tooling and feature enhancements in SDK 1.8Service Bus for Windows Server available nowAMQP 1.0 preview available now in Azure Service Bus

Page 52: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

More informationWinRT library (in Windows Azure SDK for Windows 8)Docs: http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.messaging.aspxBits: http://go.microsoft.com/fwlink/?LinkId=257545&clcid=0x409

SDK 1.8 updatesDocs: http://msdn.microsoft.com/en-us/library/jj737688.aspxBits: https://www.windowsazure.com/en-us/develop/downloads/

Service Bus for Windows ServerDocs: http://msdn.microsoft.com/en-us/library/windowsazure/jj193022(v=azure.10).aspxBits: http://www.microsoft.com/en-us/download/details.aspx?id=35374

Service Bus AMQP 1.0 previewDocs: https://www.windowsazure.com/en-us/develop/net/how-to-guides/service-bus-amqp-overview/Bits: http://nuget.org/packages/ServiceBus.Preview

Page 53: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

Thank you. Any questions?

Page 54: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

• Follow us on Twitter @WindowsAzure

• Get Started: www.windowsazure.com/build

Resources

Please submit session evals on the Build Windows 8 App or at http://aka.ms/BuildSessions

Page 55: Service Bus Sender Receiver Frontend Nodes Ctrl Forwarder outbound socket connect outbound socket rendezvous Ctrl NLB Integrated w/ WCF programming

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.