28
“Dublin” and .Net Services: Extending On- Premises Applications to the Cloud Koby Avital Product Unit Manager Microsoft Corporation Mauricio Ordonez Group Program Manager Microsoft TL40

Koby Avital Product Unit Manager Microsoft Corporation Mauricio Ordonez Group Program Manager Microsoft Corporation TL40

  • View
    215

  • Download
    1

Embed Size (px)

Citation preview

“Dublin” and .Net Services: Extending On-Premises Applications to the Cloud Koby Avital

Product Unit ManagerMicrosoft Corporation

Mauricio OrdonezGroup Program ManagerMicrosoft Corporation

TL40

IntroductionThe Problem StatementThe Architectural PatternDemoRecap & TakeawaysCall To ActionRelated sessions

What We Are Covering Today

Your App

Application extension bus

App 1

Cloud Aware

OUTPUTINPUT

extend your application with pluggable components

Imagine that you could …

App 2

In the cloud

.NET Services

Windows Application Server (“Dublin”)

Evolution of WAS/IIS and Windows Application Server to run and manage WF and WCF

services

A fabric that interconnects distributed applications across organizational and system boundaries.

Contract

Interconnects distributed applications across enterprise boundaries Formerly called “BizTalk. NET" .NET Services Infrastructure

Service Bus (point to point or pub/sub) Access Control (claims based) Workflow (application components)

Reduced infrastructure investment Built on a large-scale data center fabric Reliably hosted Quick provisioning Scale rapidly and economically

Microsoft .NET Services

Windows Application Server Extensions(Codename “Dublin”)

Evolution of WAS/IIS and Windows App Server role to run and manage WF and WCF services

Dublin services infrastructure Hosting Scale-out Monitoring Content-based routing Persistence Versioning App packaging & deployment

Windows Server

.NET Framework

“Dublin”

Visual Studio Oslo

WF and WCF services

Administration Tools

System Center

IIS/WAS

Contoso, Ltd… Is a global organization Has an on boarding process

managed on SharePoint Wants to extend their on

boarding application in a non disruptive way.

Wants to easily integrate their on boarding process with a large number of relocation vendors

Wants to automate their relocation process and normalize how vendors bid.

Problem Statement

Contoso - USA

HR Department (SharePoint)

SP List

On boarding process

Relocation VendorBusiness Logic

Contoso’s Vendors

endpoint D

endpoint C

endpoint B

endpoint A

Relocation Vendor D..Business Logic

The Application Today

Contoso, Ltd - India

Contoso, Ltd - UK

Contoso, Ltd - USA

HR Department (SharePoint)

SP List

OnBoardingWorkflow

event

Client -Browser

Relocation Vendor C

Relocation Vendor BCorp.

Relocation Vendor A Inc.Business Logic

Client -Browser

Contoso Global Enterprise

Contoso, Ltd - Headquarters

Access Control Service

Messaging Fabric

Service Bus

Cloud Aware App

Application Extension (ISV Hosted – Cloud Aware)

Windows App Server “Dublin”

Updates

.NET Services

Updates

Application Extension (In The Cloud)

Updates

Workflow Services

Subscribes

Subscribes

Event Handler

Your App

WCF Service

• Connecting to the Service bus

PublisherPublish

• Pub/Sub model

• Access control/ message security• Service contracts

Architectural Pattern

Making Applications Cloud-Aware

Mauricio OrdonezGroup Program ManagerCSD

demo

Contoso USA

HR Department SharePoint

List

OM/ SP Webservices

OnBoardingWF

WCF Service (Relay Binding)

Publisher(Relay Binding)

Access Control Service

Relocation Vendor C

Relocation Vendor B

Relocation Vendor A

Windows Application Server (“Dublin”)

RelocationService.xamlx

SendBid Activity

Messaging Fabric

Service Bus

listen

.NET Services

listen

updates

UpdateStatus Activity

StartRelocation Activity

listen

listen

publish

Connecting Applications To The Service BusImplementation

SharePoint Event Pipeline

Add SPListItem ItemAdding(Sync Event)

Database Operation

ItemAdded(Async Event)

Workflow Activation

We Hook Here

SharePoint WorkflowPublisher

Publisher Activity

ExecuteMethod

SharePoint Workflow 3.0 PublishJob Activity Execute Method

private void PublishInfo(object sender, EventArgs e){ // Get field values from the SharePoint item. string currentCity = workflowProperties.Item["Current City"].ToString(); ... TransportClientEndpointBehavior behavior = new TransportClientEndpointBehavior(); behavior.CredentialType = TransportClientCredentialType.X509Certificate; behavior.Credentials.ClientCertificate.Certificate = certificate;

Uri serviceAddress = new Uri(“sb://servicebus.windows.net/services/contoso/RelocationPublishService”) ChannelFactory<IRelocationJobPublishingService> cf = new ChannelFactory<IRelocationJobPublishingService>( new NetEventRelayBinding(), serviceAddress.ToString()); cf.Endpoint.Behaviors.Add(behavior);

using (IClientChannel proxy = cf.CreateChannel() as IClientChannel) { ((IRelocationJobPublishingService)proxy).InitiateProcess( workflowProperties.Item.ID, currentCity, newCity, startDate); } }

Svc BusCredentials

Svc BusAddress

SendMessage

Event Relay

Binding

Contoso USA

HR Department SharePoint

Relocation Vendor A

Windows Application Server (“Dublin”)

RelocationService.xamlx

SendBid Activity

Publisher(Relay Binding)

List

WCF Service(Relay Binding)

OM/ SP Webservices

OnBoardingWF

Access Control Service

Messaging Fabric

Service Bus

publish

listen

.NET Services

listen

updates

UpdateStatus Activity

StartRelocation Activity

Connecting Applications To The Service BusImplementation

listen

listen

updates

updates

Relocation Vendor C

Relocation Vendor BUri = sb://…/vendorA

Relocation WCF Service Opening a service enpoint on the Service Bus

private static void StartService() { TransportClientEndpointBehavior behavior = new TransportClientEndpointBehavior(); behavior.CredentialType = TransportClientCredentialType.X509Certificate; behavior.Credentials.ClientCertificate.Certificate = certificate;

Uri serviceAddress = new Uri(“sb://servicebus.windows.net/services/contoso/RelocationService”)

ServiceHost host = new ServiceHost(typeof(RelocationService)); host.AddServiceEndpoint(typeof(IRelocationService), new NetTcpRelayBinding(), serviceAddress);

host.Description.Endpoints[0].Behaviors.Add(behavior); host.Open(); }

Svc BusCredentials

Svc HostwithRelay

Binding

Relocation WCF Service Service operation implementation

public class RelocationService : IRelocationService { public void UpdateProcessStatus(int jobID, RelocationStatus status) {

PDCContractLibrary.ContosoUSA.Lists lists = new PDCContractLibrary.ContosoUSA.Lists(); lists.Credentials = System.Net.CredentialCache.DefaultCredentials;  string strBatch = "<Method ID='1' Cmd='Update'>" + "<Field Name='ID'>" + jobID + "</Field>" + "<Field Name='Status'>" + status.ToString()+ "</Field>" + "</Method>";  XmlDocument xmlDoc = new System.Xml.XmlDocument(); XmlElement elBatch = xmlDoc.CreateElement("Batch"); elBatch.InnerXml = strBatch;

XmlNode ndReturn = lists.UpdateListItems(Constants.SharePointJobListName,elBatch);

}

}

SharePointAPI

Managing Access Control in the Cloud with WF 4.0 rules

Mauricio OrdonezGroup Program ManagerCSD

demo

Relocation Vendor A

Windows Application Server (“Dublin”)

RelocationService.xamlx

SendBid Activity

Access Control Service

Messaging Fabric

Service Bus

Contoso USA

HR Department SharePoint

Publisher(Relay Binding)

List

WCF Service (Relay Binding)

OM/ SP Webservices

OnBoardingWF

publish

listen

.NET Services

listen

updates

UpdateStatus Activity

StartRelocation Activity

Monitoring And SLA ComplianceImplementation

Contoso Headquarters

Web App ASP.NET

Windows Application Server (“Dublin”)

SupervisorService.xamlx listen

SLA Compliance Rules

RevokeClaims Activity revoke

LogEvent Activity

listen

listen

updates

updates

Relocation Vendor C

Relocation Vendor B

publish

Vendor C - Rating = 2

Supervisor Service Listen / publish monitoring events Listen to monitoring events

TransportClientEndpointBehavior behavior = new TransportClientEndpointBehavior();

ServiceHost host = new ServiceHost(typeof(MonitoringService));

Uri serviceAddress = new Uri(“sb://servicebus.windows.net/services/contoso/SupervisorService“);host.AddServiceEndpoint(typeof(IMonitoringService), new NetEventRelayBinding(), address);host.Description.Endpoints[0].Behaviors.Add(behavior);host.Open();

Publish monitoring event

TransportClientEndpointBehavior behavior = new TransportClientEndpointBehavior();

ChannelFactory<IMonitoringService> cf = new ChannelFactory<IMonitoringService>( new NetEventRelayBinding(), serviceAddress.ToString());cf.Endpoint.Behaviors.Add(behavior); IMonitoringService channel = cf.CreateChannel();channel.PublishEvent(mEvent);

Supervisor Service 4.0 Workflow

Supervisor ServiceRevokeClaim Activity Execute method

protected override void Execute(ActivityExecutionContext context){ RelocationEvent relocationEvent = this.relocationEvent.Get(context); X509CertificateCredential credential = new X509CertificateCredential(certificate);

IdentityManagementClient identityManagementClient = new IdentityManagementClient(credential); Scope scope = identityManagementClient.GetScope("ServiceBus”, "http://servicebus.windows.net/services/contoso/");

List<AccessRule> rules = scope.GetRules();

foreach (AccessRule rule in rules) { SimpleAccessRule sRule = rule as SimpleAccessRule;

if (sRule != null && sRule.InClaim.Value == relocationEvent.VendorAccount) { scope.SetRuleStatus(sRule, false); } }}

DisableRule

AccessControlService Client

API

Design your application for extensibility using event-based architecture

Publish events to the Service Bus and communicate seamlessly, securely, and reliably across enterprise boundaries

Outsource authentication, authorization and identity management by leveraging Access Control in the cloud

Host your WF/WCF Services on “Dublin” and take advantage of enterprise-ready features

Recap and Takeaways

Download Microsoft .NET Services SDK and get an account at http://portal.ex.azure.microsoft.com/sdk.aspx

Use “Dublin” and WCF/WF 4.0 in your PDC Goods.

Apply the architectural pattern according to your application needs.

Related Sessions A Lap around Cloud Services

Service Bus Services: Connectivity, Messaging, Events, and Discovery

.NET Services: Access Control in the Cloud

Architecture of the Building Block Services

“Dublin”: Hosting and Managing Workflows and Services in Windows Application Server

WCF 4.0: Building WCF Services with WF in Microsoft.NET 4.0

Call To Action And Related Sessions

Evals & Recordings

Please fill

out your

evaluation for

this session at:

This session will be available as a recording at:

www.microsoftpdc.com

Please use the microphones provided

Q&A

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