Hybrid Applications using the Azure Service Bus David Ingham Senior Program Manager Service Bus Team 3033 Service Bus overview Recent developments with SDK 18 Service Bus for Windows Server ID: 132684
Download Presentation The PPT/PDF document "Building" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Building Hybrid Applications using the Azure Service Bus
David Ingham
Senior Program Manager, Service Bus Team
3-033Slide2
Service Bus
overview
Recent developments with SDK 1.8Service Bus for Windows ServerCross-platform hybrid apps
AgendaSlide3
Unified set of messaging capabilities Consistent management
and observation
capabilitiesService Bus Relay
Rich options for interconnecting apps across network boundariesService Bus Brokered MessagingQueuing
,
publish/subscribeEasily build hybrid apps
What is Service Bus?Slide4
Service Bus Relay
Service Bus
Sender
Receiver
Frontend
Nodes
Ctrl
Forwarder
outbound
socket
connect
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 ControlSlide5
Showcasing Service Bus Relay
Demo
Remoting
a WCF service
Audience Participation
http://tinyurl.com/sbrelaySlide6
Message queuing (Queues)Publish/subscribe (Topics, Subscriptions)
Enables loosely-coupling
Service Bus Brokered MessagingSlide7
Tightly Coupled
Store Front End
Drivers
Shipping Service
TrackingSlide8
Store Front End
Shipping Service
Drivers
Tracking
Tightly CoupledSlide9
Store Front End
Drivers
Shipping Service
Tracking
Order Queue
Loosely CoupledSlide10
Store Front End
Order Queue
Shipping Service
Drivers
Tracking
Loosely CoupledSlide11
Store Front End
Order Queue
Shipping Service
Drivers
Tracking
Loosely CoupledSlide12
Store Front End
Order Queue
Tracking
Tracking
Shipping Service
Loosely CoupledSlide13
Service Bus Queue
Queue
S
R
S
S
R
R
Sequential message log with shared cursor and locks
Can have competing consumers
Each message published is consumed by a single consumerSlide14
Service Bus Topic
S
S
S
Sequential message log; each subscription has own lock/cursor
Subscribers can
filter, based on message properties
Each message published is available to each subscription
Topic
Subs
R
R
R
R
RSlide15
Properties
Key/value pairs exposed to the broker
Subscription rules can filter based on properties
BodyOpaque payload not exposed to the broker
Can be used for encrypted data
BrokeredMessage
Brokered Message
Body
Properties
Key
Value
Key
Value
Key
Value
Key
Value
BodySlide16
Showcasing Service Bus Brokered Messaging
Demo
MartVue
: Retail Insight In Real TimeSlide17
Retail Points of Sale
Inventory and Fulfillment Centers
Business Operations
Real Time Retail Analytics
?Slide18
Store
Queue
Service Bus
InventorySlide19
Store
Queue
Service Bus
Inventory
Load LevelingSlide20
Store
Queue
Service Bus
Inventory
Store
Store
Store
Load Balancing
InventorySlide21
Store
Data Collection Topic
Service Bus
Inventory
Sub
Sub
Audit
Audit TapsSlide22
Store
Data Collection Topic
Service Bus
Inventory
Sub
Sub
Audit
Sub
Dashboard
Real-Time ObservationSlide23
Store
Data Collection Topic
Service Bus
Inventory
Sub
Sub
Audit
Sub
Dashboard
Sub
MartVue
Analyzer
Analysis Topic
Sub
Real-Time AnalysisSlide24
Store
Data Collection Topic
Service Bus
Inventory
Sub
Sub
Audit
Sub
Dashboard
Sub
MartVue
Analyzer
Analysis Topic
Sub
Catalog Topic
Sub
Scale-Out
EventingSlide25
New Service Bus features in
Windows Azure SDK 1.8Slide26
Message auto-forwarding
Link together
queues & topics
Build rich messaging flows
Scale out
topicsFan-in from several queues
Reduce coupling
QueueDescription
destinationQ
=
new
QueueDescription("myQ2");QueueDescription
sourceQ = new QueueDescription
("myQ1");sourceQ.ForwardTo =
“myQ2";Slide27
Supports long running workflows
Maximum lock duration is 5 minutes
Can 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 renewSlide28
Pause queues & topics
Useful in multi-tenant apps
Send ops blocked
for disabled queues and topics
Receive 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);Slide29
Send-time filter evaluation
Evaluate filters at
the time of message send
Warn if no subscriptions matchWorks with all types of filters
TopicDescription
td =
new
TopicDescription
(
"Topic"
);
td.EnableFilteringMessagesBeforePublishing
= true;// throws NoMatchingSubscriptionException
on sendSlide30
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;Slide31
New API capabilities in SDK 1.8
Message lock renewal
Message auto-forwardingPause entities
Send-time filter evaluationsImproved monitoringBatching APIs for sending and receiving groups of messagesConsistent send of messages to multiple entities
Session browsingSlide32
Service Bus for Windows
ServerSlide33
On-premises messaging scenario
Why & 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
Deploy
Deploy
Data
App
Develop
Develop&DeploySlide34
Cloud and on-premise symmetry
Get 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-SBClientConfiguration
Endpoint=sb://hostName/ServiceBusDefaultNamespace; StsEndpoint=https
://hostName:9355/ServiceBusDefaultNamespace; RuntimePort=9354;ManagementPort=9355
Paste it in to your configuration file:
Use it in your code:Slide35
Cross-platform h
ybrid appsSlide36
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 middlewareSlide37
Difficult to port applicationsRequires re-coding all applications
Difficult to integrate
Application level bridges to move messages and translate message formatsRestricted platform support
Limited to whatever vendor provides
Proprietary messaging protocolsSlide38
Open, standard messaging protocolEnables cross-platform apps to be built using brokers, libraries and frameworks from different vendors
Features
Efficient – binary connection-oriented protocol
Reliable – fire-and-forget to reliable,
exactly-once delivery
Portable data representation – cross-platform, full-fidelity exchange
Flexible – client-client
, client-broker, and broker-broker topologies
Broker-model independent – no
requirements on
broker internals
Advanced Message Queuing Protocol 1.0Slide39
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 standard
The culmination of several years effort by more than 20 companies
Technology 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 releasedSlide40
“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
VMwareSlide41
“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 HatSlide42
“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
SoftwareAGSlide43
“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
KaazingSlide44
“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
MicrosoftSlide45
AMQP 1.0 preview available today in Azure Service BusUpdated Service Bus client library available
Support for a range of third-party client libraries
More platforms will be supported as libraries become availableGeneral availability in H1 2013
Announcement:
Service Bus AMQP 1.0 previewSlide46
Support for multiple protocols
“
SBMP
”
high
perf
.
.NET only
AMQP 1.0
high
perf
high reach
HTTP
high reach
lower
perf
.
App
( any language )
Community Libs
AMQP 1.0
Any OS
App
(
.NET )
SB .NET Lib
“SBMP”
Windows
App
( any language )
SB Wrappers
HTTP
Any OS
.NET, Node.js, Java, PHP, PythonSlide47
AMQP 1.0 client libraries
Language
Library
C#
Service Bus .NET Client Library
Java
Apache
Qpid
Java Message Service (JMS) client
IIT
SwiftMQ
Java client
C
Apache Qpid Proton-C
PHPApache Qpid Proton-PHP
PythonApache Qpid
Proton-PythonRubyApache Qpid
Proton-Ruby (coming soon)Perl
Apache Qpid Proton-Perl (coming soon)JavaScript
Apache Qpid Proton-JavaScript (coming soon)Slide48
Showcasing support for cross-platform hybrid apps using Service Bus and AMQP 1.0
Demo
PictureMagicSlide49
Transform Requests Topic
Subs
RQ
Image Transformer
App
Client
App
MessageId
= 1234
ReplyTo
= RQ
MessageId
= 5678
CorrelationId
= 1234Slide50
Service Bus
Transform Requests Topic
Windows (on-
prem
)
Linux (Azure)
Archiver
Monitor
Transformer
Twitter
SwiftMQ
BrokerSlide51
Summary
Service Bus provides a unified set of messaging capabilities
Windows RT client library available nowNew tooling and feature enhancements in SDK 1.8
Service Bus for Windows Server available nowAMQP 1.0 preview available now in Azure Service BusSlide52
More information
WinRT
library (in Windows Azure SDK for Windows 8)
Docs: http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.messaging.aspx
Bits: http
://go.microsoft.com/fwlink/?LinkId=257545&clcid=0x409SDK 1.8 updatesDocs: http
://msdn.microsoft.com/en-us/library/jj737688.aspx
Bits: https
://www.windowsazure.com/en-us/develop/downloads/
Service Bus for Windows
Server
Docs: http
://msdn.microsoft.com/en-us/library/windowsazure/jj193022(v=azure.10).aspxBits: http://www.microsoft.com/en-us/download/details.aspx?id=35374Service 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.PreviewSlide53
Thank you. Any questions?Slide54
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/BuildSessionsSlide55