220 likes | 458 Views
SVC18. Building Hybrid Cloud Applications With the Service Bus. Clemens Vasters Principal Technical Lead Microsoft Corporation. In This Session. What is a hybrid cloud application? How to communicate across hosting sites. A familiar demo freed from “ localhost -jail”.
E N D
SVC18 Building Hybrid Cloud Applications With the Service Bus Clemens Vasters Principal Technical Lead Microsoft Corporation
In This Session • What is a hybrid cloud application? • How to communicate across hosting sites. • A familiar demo freed from “localhost-jail”. • Patterns, practices & code to take home.
A (Familiar) Distributed App Web Store Front In-Store Kiosk Delivery Driver Mobile UI In-Store Tier Web BackendService Tier Tx Processing Tier On-Device Tier Order Processing Workflow Restaurants Delivery Jobs and Status Order Handling Workflow Menus Payments and Discounts Management & Diagnostics Profile DB Catalog DB WF State DB
What was DinnerNow.net, again? • Popular MS Sample • Illustrates IIS7, ASP.NET Ajax, LINQ, WCF, WF, WPF, PowerShell, and .NET CF. • Food Home-Delivery Site • Restaurants your area • One-stop shopping • End-to-end demo from order to delivery • First published for NETFX 3.0 and updated for 3.5, 3.5 SP1 • … and here’s why this is interesting … • Existing code, not designed for the cloud • Things you can’t run in the cloud • Things you might not want to run in the cloud • … in other words … • This is like your code!
The Flow. 1 DinnerNow.net customer browsing the site for yummy food. 1 Web Store Front In-Store Kiosk Delivery Driver Mobile UI 2 In-Store Tier Web BackendService Tier Tx Processing Tier On-Device Tier 2 Site requests information about Restaurants and Menus from the Backend Services Order Processing Workflow Restaurants Delivery Jobs and Status Order Handling Workflow Menus Payments and Discounts 3 Restaurant and Menus queried from the Catalog Database 3 Profile DB Catalog DB WF State DB
The Flow. 1 DinnerNow.net customer wants to order food. 1 Web Store Front In-Store Kiosk Delivery Driver Mobile UI In-Store Tier Web BackendService Tier Tx Processing Tier 3 On-Device Tier 2 Site asks user to log on or register. Collects shipping address and credit card info. Order Processing Workflow 2 Restaurants Delivery Jobs and Status Order Handling Workflow Menus Payments and Discounts 3 Order submitted for processing. Profile DB Catalog DB WF State DB
The Flow. 1 Order Processing Applies Charges, Discounts, Loyalty Points. Web Store Front In-Store Kiosk Delivery Driver Mobile UI In-Store Tier Web BackendService Tier Tx Processing Tier On-Device Tier 3 Order Processing Workflow Restaurants Delivery Jobs and Status Order Handling Workflow 2 1 Menus Payments and Discounts Order is routed to the fulfilling Restaurant(s) 3 Restaurant personnel interacts with Kiosk application, preparing order for delivery pickup Profile DB Catalog DB WF State DB 2
The Flow. 2 1 Driver is notified on mobile device and accepts route Order Processing Computes Routes and Notifies Delivery Drivers Web Store Front In-Store Kiosk Delivery Driver Mobile UI 2 In-Store Tier Web BackendService Tier Tx Processing Tier On-Device Tier 1 Order Processing Workflow Restaurants Delivery Jobs and Status Order Handling Workflow 3 Menus Payments and Discounts 3 Driver picks up the food at the restaurant and provides delivery status. Profile DB Catalog DB WF State DB
What runs where? Cloud DinnerNow Inc. Restaurant Driver Web Store Front In-Store Kiosk Windows 7 App Delivery Driver Mobile UI Web Role Windows Phone In-Store Tier Web BackEnd Service Tier Tx Processing Tier On-Device Tier Windows Server 2008 R2 Service Windows 7 Service Web Role Management & Diagnostics Profile DB WF State DB Catalog DB SQL 2008 SQL Express SQL Azure
What runs where? Cloud DinnerNow Inc. Restaurant Device
Why is this hard? • How does the website get at the personal profiles and credit-card data? • How does the website push the orders out for processing? • How does the order process find and push to the restaurants? • How do we push alerts to the drivers? • How do the drivers check in with the restaurant?
Service Bus: Core Capabilities • Internet-scoped overlay-network bridging across NATs and Firewalls with federated access control • Network Listen/Send from any Internet-Connected PC • Internet-scoped, per-endpoint Naming and Discovery • NAT/FW Traversal via TCP and HTTP Web Streams Private Network Space Internet Space B C D A
Service Bus: Core Capabilities • Transfer raw and structured data allowing for any common shape of communication • Raw Data, Text, XML, JSON, … • Datagrams, Sessions, Correlated Messages • Unicast, Multicast A B Octet-Streams Text … JSON XML … A B SOAP XML-RPC … A B
3 Key Service Bus Pattern Families • Eventing • One-way communication • Unicast or Multicast • Immediate or temporally decoupled • Service Remoting • RPC-style, Request/Response or Duplex • Contracts, Schemas, Structured Data • Tunneling • Full-Duplex Tunneling of Raw Streams • TCP, Pipes, Proxies, …
Pattern Family 1: Eventing(Sessionless Unicast or Multicast Datagrams) Windows Azure, Datacenter, Hosting, Amazon EC2, Google App Engine “Worker Role” App Instance AppInstance Buf unicast unicast multicast Client Client Client Client Client Client NATs
Pattern Family 2: Service Remoting(e.g. session-bound, app-level ack’d document transfers + notifications) Hosted In-House Outsourced Storage Storage Storage E-CommerceFront OrderingSystem Inventory / ShippingSystem Ready PO SO Shipped Delivered ACK ACK Web Client Experience Hi-Fi Client Experience Order AcceptedOrder Processed
Pattern Family 3: Tunneling(session-bound, raw-binary transport tunneling) Windows Azure, Datacenter, Hosting, Amazon EC2 (Windows) Socket Agent NP Agent AppInstance ASP.NETADO.NET J2EE, JDBC, JMS TDSPassthrough SocketPassthrough HTTP/HTTPSPassthrough w/ URI Rewriting ACS ACS On-Premise Infra Apps & Services On-Premise Data Socket Bridge HTTP Bridge NP Bridge Exchange/Mail (SMTP/IMAP)Active Directory (LDAP)System Center (SNMP)… ERP, CRM, Custom Apps.NET, J2EE, ROR, PHP… SQL Server
Summary • No cloud platform makes building hybrid applications simpler than the Windows Azureplatform. • You use the tools you know, the technologies you know, and we’re taking care of the difficult stuff. • http://windowsazure.com • clemensv@microsoft.com
YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com
Learn More On Channel 9 • Expand your PDC experience through Channel 9 • Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses channel9.msdn.com/learn Built by Developers for Developers….