Windows Azure AppFabric Service Bus - Download Center - Microsoft
Transcript of Windows Azure AppFabric Service Bus - Download Center - Microsoft
![Page 1: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/1.jpg)
Ubiquitous Communication with the
Windows Azure AppFabric Service Bus
Christian Weyer, thinktecture [email protected]
![Page 2: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/2.jpg)
Christian Weyer and
• Solution architect and principal consultant at thinktecture
• Focus on
• distributed applications
• service orientation, workflows
• cloud computing
• interoperability
• end-to-end solutions
• Windows Server, WCF, WF, MSMQ, Windows Azure platform
• Microsoft MVP for Windows Azure (Architecture)
• Independent Microsoft Regional Director for Germany
• http://blogs.thinktecture.com/cweyer
2
![Page 3: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/3.jpg)
Let’s Ride the Bus
• Motivation
• Scenarios & Challenges
• Service Bus Relay & Messaging
• WCF Bindings
• Message Buffers
• Misc
3
![Page 4: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/4.jpg)
CRM ERP LOB Campaign HR Time Card
Benefits
Health Vendor
Market Travel Loyalty
BI Portal BI Shop
Integrated Enterprise
4
![Page 5: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/5.jpg)
CRM ERP LOB Campaign HR Time Card
Benefits
Health
Sourced
Vendor
Market
Travel Loyalty
BI Portal BI Shop
?
?
Firewall
NAT
Security Realm
Very Few Go ‘All In’ On The Cloud (aka Hybrid)
5
![Page 6: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/6.jpg)
CRM ERP LOB Campaign HR Time Card
Benefits
Health
Sourced
Vendor
Market
Travel Loyalty
BI Portal BI Shop
?
?
Firewall
NAT
Security Realm
How Can This Work?
• Existing service endpoint
• No mutual trust between
systems, VPN not an option
• Sits behind firewall and NAT
• Not built for non-corporate
identity & access control
6
![Page 7: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/7.jpg)
Wanted Patterns & Usage Scenarios
• Service remoting
• syndication
• peer-to-peer
• Multi-casting, Pub/Sub
• Callbacks, notifications
• Light-weight orchestration
• Remote control
• Tunneling
7
![Page 8: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/8.jpg)
Communication & Connectivity Challenges
• Not every application is a server application
• a number of different app styles need to communicate
• proper DMZ is seldom in place
• Advanced communication patterns
• peer-to-peer
• publish/subscribe
• enabled for cross-platform and -technology
• IPv4 address shortage
• dynamic IP address allocation
• Network Address Translation (NAT)
? Machine Firewall
Network Firewall
Network Address Translation
Dynamic IP Sender Receiver 8
![Page 9: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/9.jpg)
Dealing with Connectivity Challenges
• Dynamic DNS
• NAT port mappings / UPnP
• Open inbound firewall ports
• Virtual private networks (VPN)
• Problem
• brittle, difficult, insecure, impractical
• recurring patterns of workarounds
? Machine Firewall
Network Firewall
Network Address Translation
Dynamic IP Sender Receiver 9
![Page 10: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/10.jpg)
Communication Swiss Army Knife
10
![Page 11: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/11.jpg)
Windows Azure AppFabric
• Developer infrastructure services in the Cloud
Composite App
Service Bus
Caching
Access Control
Integration
11
![Page 12: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/12.jpg)
Windows Azure AppFabric Service Bus
• Pervasive, secure connectivity for services
• no matter where they are hosted, where they are consumed
• Runs on Windows Azure Compute and Storage
• Available in data centers all over the world
• Today, three main concepts
• naming system
• service registry
• secure connectivity & messaging
12
![Page 13: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/13.jpg)
Relayed Connection
Connect Open
Authenticate
Authenticate (optional)
1
3
2 4
Trust
AppFabric
Connectivity Through the Cloud
Direct Connection (optional)
5
6
Client Service
ACS
Service Bus
13
![Page 14: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/14.jpg)
Service Remoting
In-House Outsourced Hosted
E-Commerce
Front
Storage
Inventory / Shipping
System
Ordering
System
Storage Storage
RIA/Smart Client
PO SO Shipped
Order Accepted
Order Processed
Ready
Delivered
ACK ACK
Web Client 14
![Page 15: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/15.jpg)
Talking to the Service Bus
• Two kinds of APIs for consuming the Service Bus
• WCF-enabled clients use the Service Bus SDK
• All others can leverage REST programming features through message buffers
15
![Page 16: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/16.jpg)
WCF Bindings
• Primary programming model: WCF
• Family of bindings for the Service Bus
Corresponding WCF Binding Service Bus Relay Binding
BasicHttpBinding BasicHttpRelayBinding
WebHttpBinding WebHttpRelayBinding
WS2007HttpBinding WS2007HttpRelayBinding
NetTcpBinding NetTcpRelayBinding
n/a NetOnewayRelayBinding
n/a NetEventRelayBinding
16
![Page 17: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/17.jpg)
WCF Binding Primitives
• All bindings are based on a set of transport primitives
• Build your own custom binding
Service Bus Relay Binding Transport Binding Element
BasicHttpRelayBinding Http(s)RelayTransportBindingElement
WebHttpRelayBinding Http(s)RelayTransportBindingElement
WS2007HttpRelayBinding Http(s)RelayTransportBindingElement
NetTcpRelayBinding TcpRelayTransportBindingElement
NetOnewayRelayBinding OnewayRelayTransportBindingElement
NetEventRelayBinding OnewayRelayTransportBindingElement
17
![Page 18: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/18.jpg)
Eventing
Local, Windows Azure, Datacenter, Hosting, Amazon EC2, Google App Engine
“Worker Role”
App Instance
App
Instance
Client Client Client Client Client Client
NATs
multicast unicast unicast
18
![Page 19: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/19.jpg)
Port Configuration
• Corporate firewalls often block outgoing traffic
• except port 80 and 443
• Service Bus bindings need open outgoing ports in default mode
• Port range is specified at 9350-9353
• NetTcpRelayBinding uses 9352 and 9353
• all others use 9350 and 9351
• Even when ports are open some obstacles may still be in your way
• HTTP 1.0-only proxies
• ‘intelligently’ filtering proxies
• need for WinHTTP proxy settings
19
![Page 20: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/20.jpg)
Connectivity Modes
• System connectivity mode indicates whether to use TCP or HTTP to negotiate connections to the Service Bus
• if only port 80 and/or 443 are available you can force the Service Bus to use HTTP always
• HTTP mode uses web streams
• pair of HTTP requests bundled into fast bi-directional binary channel
20
![Page 21: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/21.jpg)
Connection Modes
• Service Bus bindings can try to establish direct connections through firewalls
• hybrid connectivity mode (relayed is default)
• event on channel property available to determine connection change
<bindings> <netTcpRelayBinding> <binding name="hybrid" connectionMode="Hybrid"> </binding> </netTcpRelayBinding> </bindings>
21
![Page 22: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/22.jpg)
Message Buffers
• Small, temporary caches where messages can be held for a short time until they are retrieved
• accessible to applications using HTTP
• long poll for messages
• Message buffers are governed by policies
• REST protocol to expose various operations on the message buffer
• creating a message buffer
• sending a message to the message buffer
• retrieving a message from the message buffer
• deleting a message buffer
• .NET API available 22
![Page 23: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/23.jpg)
Message Buffer API
// Create a message buffer var client = new WebClient(); client.BaseAddress = string.Format("https://{0}.servicebus.windows.net/{1}/", serviceNamespace, bufferName); client.Headers[HttpRequestHeader.ContentType] = "application/atom+xml;type=entry;charset=utf-8"; client.Headers[HttpRequestHeader.Authorization] = authHeaderValue; client.UploadData(String.Empty, "PUT", Encoding.UTF8.GetBytes(policy)); // Send a message to the message buffer client.Headers[HttpRequestHeader.ContentType] = "text/xml"; client.Headers[HttpRequestHeader.Authorization] = authHeaderValue; client.UploadData("messages?timeout=20", "POST", Encoding.UTF8.GetBytes( "<msg1>This is message #1</msg1>")); // Retrieve message client.Headers[HttpRequestHeader.Authorization] = authHeaderValue; string payload = Encoding.UTF8.GetString(client.UploadData( "messages/head?timeout=20", "DELETE", new byte[0])); // Delete the message buffer client.Headers[HttpRequestHeader.Authorization] = authHeaderValue; client.UploadData(String.Empty, "DELETE", new byte[0]);
23
![Page 24: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/24.jpg)
Hosting
• WCF Services with Service Bus-based bindings can only be self-hosted in a reliable way
• IIS/WAS hosting possible but no immediate integration
• can listen from an active IIS hosted AppDomain
• Windows Server AppFabric Auto-Start can help
• Key reason
• no extensibility mechanism to get between IIS and HTTP.SYS for HTTP traffic
• need to be able to replace HTTP.SYS for Service Bus to work with IIS
• activation for other bindings not yet implemented
24
![Page 25: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/25.jpg)
Security
• Service Bus mostly transparent for WCF security
• use WS-Security for end-to-end protection
• SSL endpoints on the Service Bus
• Service Bus tightly integrated with ACS
• ACS emits Send/Listen/Manage claims
• Listen claim in security token needed for opening endpoints
• baked-in issuer name / issuer key pair
• can federate with any STS through ACS
• Several supported token formats
• shared secret, SWT, SAML
25
![Page 26: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/26.jpg)
Prizing
• ACS pricing per transaction
• 1.99 $ per 100K transactions
• Service Bus pricing per ‚connection‘
• $3.99 per connection-month
• data transfer costs extra
• You can buy packages
• How does it work?
• max. amount of concurrent connections per day (monitored in a 5 minutes interval)
• invoiced based on average of this connection number
26
![Page 27: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/27.jpg)
Recommendations
• Design explicitly for the Service Bus
• Understand design of Service Bus namespaces, ACS scopes and rules
• Service Bus usage currently priced based on number of simultaneous connections
• may have implications on communication design
27
![Page 28: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/28.jpg)
Summary
• Pervasive, secure connectivity for services
• “Communication Swiss army knife”
• secure NAT traversal
• integrated with Access Control Service
• Enables new interesting applications
• WCF-based programming model
• enables new communication patterns, e.g. pub/sub
• SOAP and HTTP protocol options
• not only for .NET clients
• The Service Bus keeps evolving – new features ahead
• powerful queues
28
![Page 29: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/29.jpg)
Resources
• http://weblogs.thinktecture.com/cweyer
• Windows Azure blog category
• http://weblogs.thinktecture.com/cweyer/azure/
29
![Page 30: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/30.jpg)
Christian Weyer and
• In-depth consulting and training for software architects & developers
• Focus on
• distributed applications
• service orientation, workflows
• cloud computing
• interoperability
• end-to-end solutions
• Windows Server, WCF, WF, MSMQ, Windows Azure platform
• Contact: [email protected]
30
![Page 31: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/31.jpg)
Get Started with Windows Azure For Free Today!
• MSDN Subscriber
• Activate Your Free Included MSDN Benefits via http://tinyurl.com/activatemsdnazurebenefits
• Individual:
• Get a Free Azure Introductory via http://tinyurl.com/freeintroazureoffer
• Free Computation hours and Storage
• Get 30 Days Free Windows Azure via http://www.windowsazurepass.com
• Select Belgium and enter Promo code: AZP001
• Partner
• Get free monthly access to Azure with Partner Cloud Essentials via http://www.microsoftcloudpartner.com/
31
![Page 32: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/32.jpg)
Start Developing on the Windows Azure Platform
1. Activate your Benefits (see previous slide)
2. Get the Tools via http://tinyurl.com/toolsforazure
3. First learn how to create an application via http://tinyurl.com/deployazureapplication
32
![Page 33: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/33.jpg)
Stay up to date with MSDN Belux
• Register for our newsletters and stay up to date: http://www.msdn-newsletters.be
• Technical updates
• Event announcements and registration
• Top downloads
• Follow our blog http://blogs.msdn.com/belux
• Join us on Facebook http://www.facebook.com/msdnbe http://www.facebook.com/msdnbelux
• LinkedIn: http://linkd.in/msdnbelux/
• Twitter: @msdnbelux
Download MSDN/TechNet Desktop Gadget
http://bit.ly/msdntngadget
33
![Page 34: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/34.jpg)
TechDays 2011 On-Demand
• Watch this session on-demand via Channel9 http://channel9.msdn.com/belux
• Download to your favorite MP3 or video player
• Get access to slides and recommended resources by the speakers
34
![Page 35: Windows Azure AppFabric Service Bus - Download Center - Microsoft](https://reader030.fdocuments.us/reader030/viewer/2022021307/6207516b49d709492c303b92/html5/thumbnails/35.jpg)
THANK YOU