justin smith

28
Using the Internet Service Bus to Build Next Generation Applications and Services Justin Smith http://blogs.msdn.com/justinjsmith

Upload: damian-hampton

Post on 31-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Using the Internet Service Bus to Build Next Generation Applications and Services

Justin Smithhttp://blogs.msdn.com/justinjsmith

What is a Service?

Some functionality exposed via a structured messaging scheme…

Pop Quiz

The Services Dilemma

How do I expose a service broadly?

Callbacks on the client, across organizational boundaries, etc.

How do I keep from building identity and access control silos?

Within a service itself, or within an organization

How do I interop in a heterogeneous environment?

Multiple vendors and/or RESTHow do I orchestrate many service calls?<insert here>

The Internet Service Bus

Services hosted by Microsoft for:Firewall friendly messagingScalable pub/sub engine for the internetStandards-based securityHTTP/REST transformationsDiscoverabilityWorkflow over services (coming soon)

Currently in CTP (BizTalk Services) Available at http://biztalk.net

BizTalk Services != BizTalk Server

Naming

Tear Down That Wall.(at least the ones you want to)

Boundary Busting

BizTalkServices

Clients

Example Big-Block Topology

………

Fabrikam

Services

Northwind

Services

Contoso Services

Quickstart Account Setup and Bit Retrieval

1. Go to http://labs.biztalk.net2. Click “Create an Account”

Enter username / password for BizTalk ServicesAssociate CardSpace cards with account

3. Download and install BizTalk Services SDK

WCF binding, helper classes, samples.NET Fx 3.0 and 3.5 compatible

Quickstart – Contract Setup

Build a WCF contractOne-way, duplex, Request-reply, simple or complex data types, session settings, etc.

[ServiceContract(CallbackContract=typeof(ICallbackContract))]interface ISomeContract { [OperationContract(IsOneWay=true)] void SomeOperation(String input);} // assume SomeContract implements ISomeContract

interface ICallbackContract { [OperationContract(IsOneWay=true)] void CallbackOperation(String input);} // assume SomeCallbackContract implements ICallbackContract

Quickstart - Host Service (Listen)

Connect to BizTalk Services as per WCF model

Security options via IEndpointBehavior

RelayBinding rb = new RelayBinding();CardSpaceTokenProvider csp = new CardSpaceTokenProvider();String rootName = csp.GetUserName();

Uri address = new Uri(“sb://connect.biztalk.net/services/justin/foo”);

ServiceHost sh = new ServiceHost(typeof(SomeContract));ServiceEndpoint ep = sh.AddServiceEndpoint(typeof(ISomeContract), rb, address);

ep.Behaviors.Add(csp);sh.Open();

Quickstart – Connect a Client

Connect to BizTalk Services as per WCF model

Security options via IEndpointBehavior

SomeCallbackContract cbo = new SomeCallbackContract();

DuplexChannelFactory<ISomeContract> factory = new DuplexChannelFactory<ISomeContract>(cbo);

ISomeContract proxy = factory.CreateChannel();

proxy.SomeOperation(“Hello BizTalk Services");

Console.WriteLine("Sent message to bus");

BizTalk Services 101

Demo

GoalsWhy all the fuss?

Evolution toward “Software + Services”

Integral in Microsoft’s visionComposite applications that span systems

Feedback from customers and partners

Cross enterprise or non-addressable clientsSimplify federating security

To open the door for new applicationsConnectivity currently domain specificSimilar work replicated across domains

TechnologiesBizTalk Services Gross Anatomy

Messaging (http://connect.biztalk.net)Applications create public addressesIdentity provides simple access control

Identity (http://identity.biztalk.net)Delegate identity and access controlFederated identity (CardSpace, ADFS)Username and password

Workflow (coming soon)Pre-defined activities, very early stage development

ISB

………

sb://.../foo

sb://.../foo

sb://.../foo

TechnologiesPub / Sub via URIs

ISB

………

sb://.../foo/bar

sb://.../foo/bar

sb://.../foo

TechnologiesDirectional Messaging via URIs

ISB

………

TechnologiesDirect Connections

TechnologiesDiscovery

Services can opt-in to discoverable syndicationURI-centric design natural for relationships

BizTalk Services(Cloud)

………

sb://.../foo

sb://.../bar/baz

http://.../services

BizTalk Services embraces WS-Addressing

From, To, RelatesTo, FaultTo, ReplyTo, etc.Addresses persisted in the Message

In WCF, To often equals the transport addressIn BizTalk Services, To != transport address

Transport Address == net.tcp://<cloud address>…To == sb://connect.biztalk.net/services/…

Enables rich one way messaging patterns

WS-Addressing and BizTalk ServicesTechnologies

Simple REST definitionEmbrace the URI, HTTP GET is special, ContentType is the data model

WCF in .NET Fx 3.5 has cool REST capabilitiesRelayBinding is not directly interoperable and uses SOAPBizTalk Services can tunnel HTTP GET over SOAP messages to a running service

.NET Fx 3.5 OM compatibility in later version

TechnologiesREST and BizTalk ServicesTechnologies

ISB

ISB REST Example

………

ClientPicture Store

Picture Sharing

The ISB & Picture Sharing

Demo

What are the first 2 "lines of code" in "all" applications?

1) Who are you?2) What are you allowed to do?

Pop Quiz

Delegate identity & access controlClaims transformation engine (claims in / out)Interoperable (WS-Trust)Federated HTTP AuthenticationManage through web page and/or API

Flexible identity provider:CardSpace, LiveID, Username/Password

Identity options set by an IEndpointBehavior

CardSpaceTokenProviderUsernameTokenProvider

TechnologiesIdentity & Access ControlTechnologies

ISB Security Concepts

Demo

ISB Security Example

RemoteContractor

Contoso Factory

Factory Workers

Host and Robot

Authorization Service(Internet Service Bus)

Contoso Factory Automation

The ISB & Factory Automation

Demo

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