… and heres why this is interesting … existing code, not designed for the cloud things you cant...

22
Building Hybrid Cloud Applications With the Service Bus Clemens Vasters Principal Technical Lead Microsoft Corporation SVC18

Upload: dania-mixon

Post on 30-Mar-2015

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

Building Hybrid Cloud Applications With the Service BusClemens VastersPrincipal Technical LeadMicrosoft Corporation

SVC18

Page 2: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

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.

Page 3: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

A (Familiar) Distributed App

Web Store Front

Web Backend

Service Tier

Profile DBCatalog

DB

Restaurants

Menus

Tx Processing

TierOrder

Processing Workflow

In-Store Tier

Payments and Discounts

In-Store Kiosk

Order Handling Workflow

WF State DB

Delivery Driver Mobile

UI

On-Device Tier

Delivery Jobs and Status

Management & Diagnostics

Page 4: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

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!

Page 5: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

The Flow.

Web Store Front

Web Backend

Service Tier

Profile DBCatalog

DB

Restaurants

Menus

Tx Processing

TierOrder

Processing Workflow

In-Store Tier

Payments and Discounts

In-Store Kiosk

Order Handling Workflow

WF State DB

Delivery Driver Mobile

UI

On-Device Tier

Delivery Jobs and Status

1

2

3

DinnerNow.net customer browsing the site for yummy food.

1

Site requests information about Restaurants and Menus from the Backend Services

2

Restaurant and Menus queried from the Catalog Database

3

Page 6: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

Web Backend

Service Tier

Restaurants

Menus

Tx Processing

Tier

Payments and Discounts

The Flow.

Web Store Front

Profile DBCatalog

DB

Order Processing Workflow

In-Store Tier

In-Store Kiosk

Order Handling Workflow

WF State DB

Delivery Driver Mobile

UI

On-Device Tier

Delivery Jobs and Status

1

2

3

DinnerNow.net customer wants to order food.

1

Site asks user to log on or register. Collects shipping address and credit card info.

2

Order submitted for processing.

3

Page 7: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

Profile DB

Web Store Front

Web Backend

Service Tier

Restaurants

Menus

Tx Processing

Tier

Payments and Discounts

The Flow.

Catalog DB

Order Processing Workflow

In-Store Tier

In-Store Kiosk

Order Handling Workflow

WF State DB

Delivery Driver Mobile

UI

On-Device Tier

Delivery Jobs and Status1 2

Order Processing Applies Charges, Discounts, Loyalty Points.

1

Order is routed to the fulfilling Restaurant(s)

2

Restaurant personnel interacts with Kiosk application, preparing order for delivery pickup

3

3

Page 8: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

In-Store Kiosk

Profile DB

Web Store Front

Web Backend

Service Tier

Restaurants

Menus

Tx Processing

Tier

Payments and Discounts

The Flow.

Catalog DB

Order Processing Workflow

In-Store Tier

Order Handling Workflow

WF State DB

Delivery Driver Mobile

UI

On-Device Tier

Delivery Jobs and Status

3

Order Processing Computes Routes and Notifies Delivery Drivers

1 Driver is notified on mobile device and accepts route

2

Driver picks up the food at the restaurant and provides delivery status.

3

2

1

Page 9: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

DriverRestaurantDinnerNow Inc.

Cloud

What runs where?

Web Store Front

Web BackEnd

Service Tier

Profile DBCatalog DB

Tx Processing

TierIn-Store Tier

In-Store Kiosk

WF State DB

Delivery Driver Mobile

UI

On-Device Tier

Management & Diagnostics

Web Role

Web Role

SQL Azu

re

SQL 2008

SQL

Express

Windows 7

ServiceWindows

Server

2008 R2

Service

Windows 7

App

Windows

Phone

Page 10: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

Device

Restaurant

DinnerNow Inc.

Cloud

What runs where?

Page 11: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

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?

Page 12: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

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

DA

Page 13: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

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

Octet-Streams

Text

JSON …

XML

A B

A B

A B

SOAP

XML-RPC

Page 14: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

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, …

Page 15: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

Pattern Family 1: Eventing(Sessionless Unicast or Multicast Datagrams)

Windows Azure, Datacenter, Hosting, Amazon EC2, Google App Engine

“Worker Role” App Instance

AppInstance

Client Client Client Client Client Client

NATs

multicast

unicastunicastBuf

Page 16: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

In-House Outsourced

Pattern Family 2: Service Remoting(e.g. session-bound, app-level ack’d document transfers + notifications)

Hosted

E-CommerceFront

Storage

Inventory / ShippingSystem

OrderingSystem

Storage

Storage

Hi-Fi Client Experience

PO SO Shipped

Order AcceptedOrder Processed

Ready

Delivered

ACK ACK

Web Client Experience

Page 17: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

Pattern Family 3: Tunneling (session-bound, raw-binary transport tunneling)

Windows Azure, Datacenter, Hosting, Amazon EC2 (Windows)

AppInstance

On-Premise Data

NP Bridge

SQL Server

TDSPassthrough

ASP.NETADO.NET

NP Agent

ACS

On-Premise Infra

Socket Bridge

Exchange/Mail (SMTP/IMAP)

Active Directory (LDAP)System Center (SNMP)

Socket Agent

ACS

SocketPassthrough

Apps & Services

HTTP Bridge

ERP, CRM, Custom Apps

.NET, J2EE, ROR, PHP…

J2EE, JDBC, JMS

HTTP/HTTPSPassthrough

w/ URI Rewriting

Page 18: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

Summary

> No cloud platform makes building hybrid applications simpler than the Windows Azure platform.

> You use the tools you know, the technologies you know, and we’re taking care of the difficult stuff.

> http://windowsazure.com> [email protected]

Page 19: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

YOUR FEEDBACK IS IMPORTANT TO US!

Please fill out session evaluation

forms online atMicrosoftPDC.com

Page 20: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

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/learnBuilt by Developers for Developers….

Page 21: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run

© 2009 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.

Page 22: … and heres why this is interesting … Existing code, not designed for the cloud Things you cant run in the cloud Things you might not want to run