Michele Leroux Bustamante, IDesign Zoiner Tejada, Hershey Technologies Session Code: PRC07 Michele Leroux Bustamante Chief Architect IDesign: www.idesign.net Microsoft Regional Director, MVP Connected Systems Published Author: ASP.NET Pro (WCF Column), MSDN, CoDe Learning WCF (O’Reilly 2007/2008/2009) Speaker: Tech Ed, PDC, Dev Connections, other international events Blogs: www.dasblonde.net (main) www.thatindigogirl.com (book) Zoiner Tejada Chief Software Architect Hershey Technologies: www.hersheytech.com Microsoft Influencer & Advisor Published Author: WF Whitepaper on MSDN Monthly WF Article Series on MSDN Speaker: Tech Ed, PDC, Dev Connections, San Diego .NET User Group ArchSig Instructor: UCSD Extensions Blog: www.theworkflowelement.com Agenda The New Middle Tier: WCF 4 + WF 4 + Dublin Introducing WCF 4 Introducing WF 4 WF 4 Activity Development WCF Workflow Services Hosting WCF and WF in Dublin Session Objectives And Takeaways Session Objective(s): Review features of new middle tier functionality of Windows Server 2008 Discuss supporting tools and features in WCF 4, WF 4 and Dublin The new middle tier improves reliability, availability and scalability Includes enhancements for configuration, deployment, tracking, monitoring, persistence, and instance management Enterprise Applications and the Middle Tier The concept of a middle tier evolved as systems became more complex Need to distribute functionality Secure that functionality Improve productivity working with object models instead of direct database calls Middle tier is also referred to as an application server or container Most enterprise application scenarios rely on the middle tier to host and manage services Intranet Applications Classic client-server deployments The middle tier supplies services to remote clients All tiers belong to a particular Windows domain Intranet Client Active Directory TCP Services App Server Database Server Web Services The middle tier exposes interoperable services to remote clients Services based on SOAP and WS* protocols Internet Client (Basic Profile) Internet Client (WS*) HTTPS HTTP Services Web Server Database Server HTTP Resources The middle tier exposes resources over HTTP through a web programming model Protocols include POX, REST, AtomPub Browser Browser AJAX Silverlight HTTPS HTTP Services Web Server Database Server Distributed Services Browser HTTPS Services hosted in the middle tier may live behind the DMZ Web applications communicate with business services behind the firewall Web Application Web Server TCP Services App Server Database Server Workflow Services Browser HTTPS Middle tier functionality may be distributed across multiple physical tiers May expose workflow services to the internet, which coordinate calls to business services behind the firewall Workflow Services Web Server TCP Services App Server Database Server Typical Middle Tier Characteristics Development platform and runtime host for components and services Deployment, updates and versioning Instance lifecycle management Persistence and data access Security Monitoring and tracking Configuration and management tools Availability and scalability The Application Server Role What do we have today? Windows Server 2008 supplies the Application Server Role for middle tier functionality Enables features and management tools Features include: Internet Information Services (IIS) 7 Windows Process Activation Service (WAS) .NET 3.0 ASP.NET Microsoft Message Queuing (MSMQ) COM+ Services The Application Server Role What do we have today? WAS IIS Manager IIS 7 COM+ Services MSMQ WF WCF Management Tools .NET Framework ASP.NET Windows Server 2008 ADO.NET The New Middle Tier WCF 4 + WF 4 + Dublin Collectively improves the application server role for Windows Server 2008 Provides much needed tools specifically for managing WCF and WF services Easier deployment Centralized configuration Visibility into application functionality Durable instance management Service discovery and routing Improved reliability, availability and scalability The New Middle Tier Middle Tier Features - Before IIS Manager Configuration Hosting IIS 7 Security Monitoring WAS Security Security MSMQ WCF Security Security .NET Framework Management Tools Windows Server 2008 COM+ Instance Mgt WF Security .NET 4 Features The New Middle Tier Dublin Features Middle Tier Features - After Instance Mgt Tracking Persistence Monitoring Hosting Discovery Configuration Routing Deployment Hosting IIS Manager WAS Security Configuration IIS 7 Deployment Monitoring Security Security MSMQ COM+ Instance Mgt Management Tools Security Security Security Discovery .NET Framework Tracking Routing Tracking Microsoft Confidential Persistence WF Monitoring WCF Instance Mgt Dublin-Related Enhancements The New Middle Tier Dublin-Related Features Quadrant Visual Studio IIS Manager Model Deployment to Dublin WF and WCF Project Templates WF and WCF Management Modules Management APIs (PowerShell cmdlets) Persistence Availability, Deployment, Control Durable Timer Service Discovery Service Reliablility, Scalablity Instance Restart Behavior SQL Persistence Provider Monitoring Messaging Application Monitoring WF SQL Tracking WCF SQL Tracking Versioning, Partitioning, Routing Router Service AutoStart Service Persistence schema Runtime Databases WCF and WF Frameworks IIS/WAS Microsoft Confidential Windows Server 2008 Monitoring schema System Center Hosting App Server SCOM Pack Dublin-Related Tools and Features The New Middle Tier What are the core benefits? Easier Deployment Improve developer productivity deploying from Visual Studio Make it easier to import and export applications in IIS with both UI and PowerShell Centralized Configuration Empower IT administrators to configure relevant settings for services Enable and configure new features for persistence, tracking, automatic start, exception handling, instance restart The New Middle Tier What are the core benefits? Instance Management Built-in persistence model and instance management UI Can suspend, resume, abort or terminate workflow instances Tracking and Monitoring Increased visibility into WCF Workflow Services Useful for troubleshooting problems, report generation The Buzz Shoppe Order Fulfillment Service Submit Order Client Web App Labeling Service Create Label Orders Service Check Inventory Inventory Service Approve Label Check Credit Finalize Order Credit Card Processing Service A Tour of Features The New Middle Tier The New Middle Tier Reliability and Availability The new middle tier supplies a platform with increased reliability and availability for WCF and WF Services Message-based activation Automatic start improves host responsiveness Persistence Improved lock management Restarting failed WF Service instances The New Middle Tier Scalability New middle tier supports various scalability strategies Asynchronous messaging with WF Services Load balancing through persistence RouterService supports load balancing, contentbased, and other routing heuristics Improved lock management reduces contention across machines for an instance Release and Requirements The new middle tier is available to the following platforms: Windows Server 2008 + IIS7/WAS Vista + IIS7/WAS Windows 7 Intended for WCF 4 and WF 4 services Can host .NET 3.5 services, limited features .NET Framework 4 will release with VS 2010 Dublin to be released initially as a web download approximately 2-3 months later Eventually part of the operating system Summary: The New Middle Tier New features shipped with WCF 4, WF 4 and Dublin collectively extend the Application Server role on Windows Server 2008 The new middle tier is the standard hosting environment for WCF and WF Services Enhances deployment, configuration, tracking and monitoring, persistence, instance management Also improves overall application reliability, availability and scalability Session Objectives And Takeaways Session Objective(s): Understand the scenarios supported by WCF Learn new features to be released with WCF 4 WCF is a rich platform supporting many distributed computing scenarios WCF 4 introduces enhancements and new features related to configuration, tracing, messaging, serialization, discovery and routing Combined with the power of WF 4, workflow services and asynchronous programming models are more compelling What Is WCF? Windows Communication Foundation (WCF) WCF is a feature-rich platform for building distributed, interoperable, available, and scalable service-oriented applications Unifies programming models for remote communications: ASP.NET Web Services (ASMX), .NET Remoting, and Enterprise Services/COM+ Supports n-tier, simple web services, a rich set of WS* protocols, and web programming models (POX, REST, JSON, AtomPub) Intranet Applications WCF supports classic client-server deployments Services distributed across process or machine boundaries Characteristics: TCP/binary messaging Mutual Windows authentication Intranet Client Windows Active Directory TCP NetTcpBinding Service Business Components DALC Web Services WCF supports SOAP/WS* protocols to build interoperable services Characteristics: HTTP/Text messaging Transfer security via SSL or message security Username and password authentication (typical, but many options exist) Internet Client (Basic Profile) Internet Client (WS*) UserName HTTPS HTTP credentials BasicHttpBinding WSHttpBInding Service Business Components DALC Distributed Services Browser HTTPS WCF services can encapsulate business functionality for web applications Security boundary Distribution across boundaries Characteristics: TCP/binary messaging Mutual certificate authentication UserName credentials ASP.NET Application Certificate TCP NetTcpBinding Service Business Components DALC Certificate Store SOA Internet Client (Basic Profile) HTTPS WCF is a strategic part of a service-oriented application Services represent the boundary to all business logic Internet Client (WS*) Browser HTTP HTTPS ASP.NET Application NetTcp WSHttp BasicHttp Service Business Components Data Access Web Programming WCF supports web programming models Useful for AJAX and Silverlight clients Characteristics: POX, REST, Atom/Pub Typically secured by URL with web application security Browser Browser AJAX Silverlight HTTP/HTTPS WebHttpBinding WebHttpBinding Service Business Components DALC WCF Platform Support Released with the .NET Framework 3.0 Installed with Windows Vista, Windows Server 2008 Supported on Windows XP/SP2, Windows Server 2003 Enhanced with .NET Framework 3.5 + SP1 New features coming with .NET Framework 4 .NET Framework 4 .NET Framework 3.5 / SP1 WPF .NET Framework 3.0 WF WCF CardSpace .NET Framework 2.0 Windows XP SP2 Windows Server 2003 Windows Vista Windows Server 2008 .. WCF Fundamentals Client App Proxy Endpoint Client Process ServiceHost Endpoint Service Endpoint Host Process WCF Fundamentals Client App ServiceHost A Proxy C B C Service B A A Client Process B C Host Process Endpoint A Address => where? B Binding => how? C Contract => what? WCF 101 WCF 3.0 Supplies core functionality Contracts and serialization Exception handling Protocol support via binding configuration Hosting with IIS, WAS, Windows Services, and any managed application host Control over instancing models, throttling Security scenarios from username/password to federated security Reliable messaging, queued calls, transactions WCF 3.5 Support for partial trust scenarios such as Silverlight clients Productivity improvements VS 2008 templates, Add Service Reference WCF Service Host and WCF Test Client AJAX integration Updated for the latest WS* protocols Support for the web programming model POX, JSON, REST, Syndication Persistence with durable and workflow services WCF 3.5 SP1 POCO data contracts, ADO.NET Entities Web programming enhancements Improved URI template support Improved object model for syndication Better productivity with VS 2008 Silverlight templates, improved WCF Test Client, deployment wizard Performance improvements Automatic channel factory caching Asynchronous support for IIS7 Diagnostics for partial trust scenarios WCF 4 Configuration defaults, automatic endpoints New serialization features Features from the WCF REST Starter Kit Queued messaging enhancements Support for new protocols Service discovery based on WS-Discovery Content-based routing WCF Workflow Services High performance tracing with ETW Service Discovery WS-Discovery implementation SOAP over UDP using well-known endpoints Services announce joining/leaving network Discovery clients can receive announcements or probe for services Discovery Client Discovery Client Probe Announcements (hello/goodbye) Service A Service B Service A Service B Discovery Routing Service Easy to configure routing implementation Routing and filtering based on predefined or custom heuristics Filter by action, address, header or body content Useful for: Content-based routing Versioning Partitioning Client ServiceA Routing Service ServiceB Filter Tables Config Filters Routing WCF Workflow Services .NET 4 brings compelling reasons to build WCF services as Workflow Services Increased visibility through correlated tracking and tracing events Simplified implementation of asynchronous programming models Significantly improved performance of the WF runtime Declarative (XAMLX) services increase deployment and versioning options WCF Workflow Services High-Performance Tracing WCF tracing based on Event Tracing for Windows (ETW) High-performance tracing, much improved over <system.diagnostics> configuration WCF becomes an ETW event provider Dublin ships tooling to ETW controller and consumer to retrieve real-time events and push to monitoring store WF tracking and WCF tracing models are unified in .NET Framework 4 Summary: WCF 4 Solves pain points related to configuration, serialization, messaging and tracing Popular WCF REST Starter Kit features will be built-in to simplify web programming Discovery and routing provide much needed enterprise-ready features WCF Workflow Services simplify designing services, enable powerful asynchronous exchanges and increase visibility through tracking and tracing Session Objectives And Takeaways Session Objective(s): Understand reasons to use WF Know how to design, debug and run workflows Workflow has been greatly enhanced to minimize the need for code Workflow consists of activities, runtime and tools support Why WF? Implementation translucency Business users can visualize complex process Enables domain specific vocabulary Results in audit friendly logic Efficiently support long running processes Simplifies scalable handling of state data Composition based approach Composing reusable logic easier than with code Scenarios Human Workflow Computational Workflows Orchestration of Services Workflow is ART Runtime Activities Activity Library Workflow Out of the box Custom Extensions Runtime Extensible Execution Environment Scheduler Persistence Provider Tracking Participant Custom Extension Tooling OOB & Build to Suit VS Designer Rehosted Designer WF Debugger Workflow Types Sequential Top to bottom Linear execution Flow Chart “Natural” diagramming approach Directed Graph (where arrows point, execution goes) State Machine** Sequential Diagram Use for linear execution patterns where simplicity is key. Activity layout is rigid. Loops must be structured and rely on child composite activity (e.g., While activity). Flowchart Diagram Best choice for representing arbitrary cycles. Activity layout is free floating. Loops formed from directed graph. Workflow Activities Out of the box activities for: Control Flow WCF Messaging Variables & Collections Expressions Invoking Methods Exception Handling Transactions & Compensation Legacy Interop Visual Studio Design Experience Project Templates Declarative Flowchart/Sequential Service Library Flowchart/Sequential Workflow Console Application Activity Library & Activity Designer Library Item Templates Activity, Workflow Element & Activity Designer Flowchart & Sequence Declarative Flowchart & Sequence Graphical WF Debugging Designing Workflows Design with Drag & Drop XAML Generating Workflows in Code Coded activity graph can serialize to XAML Declarative Workflows XAML x:class allows definition of new activity type w/custom arguments default used in Visual Studio non x:class composition using known types cannot define new arguments XAMLX Tool support only for “non x:class” form Used by Workflow Services Neither format allows for a code behind. VS Design Experience Building a simple workflow from scratch Data Flow Result WorkToDo WorkToDo DoWork Result DoWork Result WorkToDo DoWork Result OutArgument WorkToDo DoWork 2 Result WorkToDo DoWork 2 Result Data Flow Declarative Arguments & Variables Eliminate need to write code for data storage Simplifies data exchange patterns between activities Application of scope reduces serialized size of persisted workflow instances Expressions Expression support within Arguments Assign activity for declarative assignment Data Flow Building a simple data-driven workflow Running a Workflow • Unit Testing Workflow Invoker Simple Workflow Instance • Simple executable • Robust Hosting Workflow ServiceHost Complex Communicating with Workflows Input/Output Arguments on Workflow Not available on XAML workflows Exchanged via Dictionaries Bookmarks Primary mechanism for a workflow to request and a host to provide data Synonymous with available "actions“ OOB Communication Activities Communicating with Workflows Using WorkflowInstance to pass data in and out of a workflow Exception Handling Activity Local Exception Handling TryCatch activity Catch<T> activity Workflow Unhandled Exceptions WorkflowInstance. OnUnhandledException delegate Workflow Tracking .NET 4.0 provides ETWTrackingParticipant Can build own TrackingParticipant (e.g. to SQL) Tracking Profiles control verbosity, content Logs the following events: Workflow status changes Activity status changes Custom user data Variable values Runtime Workflow Extensions Scheduler Persistence Provider Tracking Participant Custom Extension Workflow Persistence OOB provides SqlPersistenceProvider Can build own PersistenceProvider Controlled by host or by Persist activity in a workflow No-Persist Zones Enables efficient resource use and load balancing Runtime Workflow Extensions Scheduler Persistence Provider Tracking Participant Custom Extension Workflow & Activity Lifecycle Created Running Completed Persistence & Tracking Visualizing workflow execution progress using a custom monitoring application Comparing WF 4.0 to WF 3.5 Improvements 10-100x Runtime Performance Improvement Significantly less code required because of declarative nature Greatly enhanced designer Seamless composability across workflow types Migration Side by side support Interop activity Session Objectives And Takeaways Session Objective: Understand workflow & activity lifecycle Be able to build rich custom activities Understand how to build custom activity designers Know how to rehost the workflow designer Custom activities can be built composition and by derivation There is new approach to activity designer registration that applies to both VS and rehosted environments Developing Custom Activities Why? Model custom control flow, Implement logic not available OOB Expand vocabulary of activities with domain specific activities. Approaches: Composition with Activity Imperative Activities Activity Class Hierarchy WorkflowElement NativeActivity Lowest Level CodeActivity Activity Highest Level Composition With Activity <p:Activity x:Class=MyActivity” …> <p:Sequence …> <my:DoWork1 ...> <my:DoWork2 ...> <my:DoWork3 ...> </p:Sequence> </p:Activity> DoWork1 DoWork2 DoWork3 public class MyActivity: Activity { protected override WorkflowElement CreateBody() { return new Sequence() { Activities = { new DoWork1(), new DoWork2(), new DoWork3() } }; } } Composition With Activity Building a simple composite activity Imperative Activities Derive from CodeActivity Override Execute method Use the Code Activity Execution Context public class SimpleActivity: CodeActivity { protected override void Execute(CodeActivityExecutionContext context) { //activity logic goes here context.Track(new UserTrackingRecord("Custom activity executed!“)); } … } The Buzz Shoppe Order Fulfillment Service Submit Order Client Web App Labeling Service Create Label Orders Service Check Inventory Inventory Service Approve Label Check Credit Finalize Order Credit Card Processing Service The Buzz Shoppe Implementing the LabelGenerator custom activity Using Arguments & Variables in Custom Activities Arguments get data in or out of a custom activity Variables provide the means for a composite custom activity to share data with its children Unit Testing Use WorkflowInvoker Pass in required init argument values Set breakpoints if attached with debugger Get data out via return value MyActivity activityInstance = new MyActivity(); Dictionary<string, object> input = … Dictionary<string, object> ouput = WorkflowInvoker.Invoke(activityInstance, input); Unit Testing Using WorkflowInvoker to Unit Test LabelGenerator Custom Activity Custom Activity Designers Why? Provide intuitive, domain specific user interfaces for configuring activity properties and for controlling activity display on the design surface. Enable loose coupling between activity implementation and activity configuration Designer Registration in VS DesignerAttribute Applied to Activity Class IRegisterMetaData – In Activity Assembly Activities.dll IRegisterMetaData – In Separate Assembly Activities.Design.dll WPF Based Activity Designers Workflow Activity Designer item template WorkflowElementDesigner – Design surface WorkflowItemPresenter – Atomic activity WorkflowItemsPresenter – Composite Activity ExpressionTextBox Model Item binding explained ModelItem.Activities, ModelItem.Body In designers, DataContext is set to control itself The Buzz Shoppe Order Fulfillment Service Submit Order Client Web App Labeling Service Create Label Orders Service Check Inventory Inventory Service Approve Label Check Credit Finalize Order Credit Card Processing Service The Buzz Shoppe Building a designer for the LabelGeneratorActivity Designer Rehosting Why? For Authoring For Analysis Designer View Property Inspector View Registering Activity Designers Building the Experience Self hosting & executing workflows Overlaying tracking data Inspecting instance state data Session Objectives And Takeaways Session Objective: Understand the structure of a Workflow Service Learn how to design, host, run and debug Workflow Services effectively Workflow Services are a powerful way to implement declarative services using activities Workflow Services offer two forms of message to workflow instance correlation Message correlation empowers useful asynchronous messaging scenarios Why WCF Workflow Services? WCF Services provide the industry accepted invocation mechanisms Workflows provide the service implementations in an easier to understand, reduced code way Coordinate asynchronous tasks Compose service calls into new services Utilize robust tracking infrastructure Use Workflow Services! Introducing Workflow Services Define service implementation with workflows Service.xamlx Contracts Endpoints Workflow Implementation web.config or app.config Steps to Build a Workflow Service Add & Configure Receive Activities Create SendReply Activities by copying from Receive Optionally, adjust service settings in *.config Host the Workflow Service Workflow Implementation One Way Service Activities Receive Send Request/Reply Template Activities ReceiveAndSendReply SendAndReceiveReply Reply Activities Introducing Workflow Services Building a Simple Workflow Service Creating Service Contracts Workflow Services Service contracts defined implicitly by Receive activity settings: ServiceContractName OperationName ValueType Defining Multiple Service Contracts Single workflow can implement multiple service contracts ManufacturingService.xamlx Inventory Contract 1 Assembly Line Contract GetQuantityInStock ScheduleAssembly ReserveItem QueryProgress Receive ReserveItem 2 Receive ScheduleAssembly Instance Creating Service Operations Workflow Instances can be created and launched in response to service call: CanCreateInstance = true Creating Service Client Activities Send activities used in outgoing calls to external services Add Service Reference supported Contracts for Send activities are automatically defined Drag and drop from toolbox Hosting Workflow Services WorkflowServiceHost XAMLX Activity Library SendMessage ReceiveMessage Endpoints Config WF Control Endpoint Extensions ClientOperation Persistence ServiceOperation Tracking Metadata ServiceHostBase IIS | Dublin | EXE WorkflowControlEndpoint Provides following methods: Abandon Cancel Create / CreateWithInstanceId Run Suspend / Unsuspend Terminate Transacted versions of above Acts on a single workflow service instance identified by GUID Configuration (*.config) XAMLX’s WorkflowServiceImplementation ConfigurationName maps to *.config’s Service Name Defines Service Declares service Provides additional config for service defined in XAMLX via behaviors Service Behaviors Include exception details in faults Expose service metadata (WSDL) Persistence & Tracking The Buzz Shoppe Order Fulfillment Service Submit Order Client Web App Labeling Service Create Label Orders Service Check Inventory Inventory Service Approve Label Check Credit Finalize Order Credit Card Processing Service The Buzz Shoppe Implementing the Inventory Workflow Service Introducing Correlation Map messages to specific workflow instance Uses correlation queries Two types of correlation Context based Content based Can use both within single workflow service ID = 42 ID = 42 Correlation Query Instance Store Context Based Correlation Correlating on the GUID instance ID of the workflow Other Service Workflow GUID Send Correlation Query Instance Store Receive GUID Correlation Query GUID Calls Back Content Based Correlation XPath extraction of correlation value, run against entire message envelope Other Service Workflow Id = 42 Send Correlation Query Instance Store Receive Id = 42 Correlation Query Id = 42 Calls Back Asynchronous Operations One way operations using correlation provides simple async infrastructure Other Service Workflow Send Id = 42 Do Work Do Work Do Work Receive Id = 42 Calls Back The Buzz Shoppe Order Fulfillment Service Submit Order Client Web App Labeling Service Create Label Orders Service Check Inventory Inventory Service Approve Label Check Credit Finalize Order Credit Card Processing Service The Buzz Shoppe Building the Order Fulfillment Orchestrating Workflow Service Session Objectives And Takeaways Session Objective(s): Become acquainted with Dublin’s core features Learn how Dublin-related features improve deployment, configuration, management, and monitoring of WCF and WF services Dublin offers enterprise-ready features for hosting, persistence, monitoring and messaging Dublin includes templates, management tools, PowerShell automation, and OOB services supporting common requirements What is "Dublin"? Dublin comprises many tools and features: Enhanced database schemas to support persistence and monitoring Features installed via extensions to IIS Manager and to the .NET Framework PowerShell APIs support automation Dublin, along with WCF 4 and WF 4, enhances the Application Server role on Windows Server 2008 Collectively, the new middle tier Dublin Goals Makes it easier to host and manage WCF and WF Services “It just works” is the Dublin tag line Provide much needed tooling and scripting for deployment, management, tracking and monitoring Tooling in Visual Studio and IIS Manager Automation with PowerShell Extends the .NET Framework with a rich set of OOB functionality that satisfies common requirements Dublin-Related Enhancements The New Middle Tier Dublin-Related Features Quadrant Visual Studio IIS Manager Model Deployment to Dublin WF and WCF Project Templates WF and WCF Management Modules Management APIs (PowerShell cmdlets) Persistence Availability, Deployment, Control Durable Timer Service Discovery Service Reliablility, Scalablity Instance Restart Behavior SQL Persistence Provider Monitoring Messaging Application Monitoring WF SQL Tracking WCF SQL Tracking Versioning, Partitioning, Routing Router Service AutoStart Service Persistence schema Runtime Databases WCF and WF Frameworks IIS/WAS Microsoft Confidential Windows Server 2008 Monitoring schema System Center Hosting App Server SCOM Pack Dublin-Related Tools and Features Dublin and IIS Manager Dublin adds features to IIS Manager Can configure for machine, web site or application Hierchical inheritance of settings Export/Import are MSDeploy features Dublin and PowerShell Management API Dublin supplies a collection of PowerShell cmdlets to automate access to features Execute cmdlets from: Windows Application Server PowerShell Console Custom PowerShell scripts MSBuild scripts IIS Manager WF and WCF Management Modules Management APIs (PowerShell Cmdlets) MSDeploy MSBuild Custom PowerShell Scripts Dublin and Visual Studio Enhancing WCF and WF Service templates Generate IIS application Sample service and config Enable Dublin behaviors F5 debugging experience Microsoft Confidential Dublin Features Features that support configuration, deployment, hosting, persistence, monitoring and messaging Extensions to the .NET Framework Supporting database schemas WCF/WF Management Modules in IIS Configure features Track and monitor services Control persisted service instances Tight integration with WCF 4 and WF 4 features Centralized Configuration Accessibility of WCF and WF Service configuration settings relevant to IT administrators Control service throttling behaviors Configure service certificates Enable new persistence and tracking behaviors to facilitate state management and monitoring Enable new hosting behaviors for exception handling, automatic start and instance restart Easier Deployment From Visual Studio: Developers can create new applications that are hosted in Dublin Developers can publish and debug applications From IIS: Can refine application configurations and export packages Can import packages to set up new machines MSDeploy features Can automate with PowerShell Managing Deployments Visual Studio templates set up application directories with default configuration F5 debugging support in Visual Studio Publishing from Visual Studio Application export and import through IIS Manager or PowerShell Export/Import are MSDeploy features Dublin installs MSDeploy Managing Deployments Deploy services from VS or with PowerShell Export and import applications and services Automate service updates Disable messaging protocols for updates Services Services Services Services Services Services Export Package.zip Import Application Application Dublin Dublin Development Server Test Server Managing Deployments AutoStart Services hosted in Dublin use message-based activation The AutoStart feature improves host responsiveness Initializes the worker process before the first message is received Important availability feature for services hosted in the Cloud Persistence Dublin supplies database schema and configuration WF 4 supplies persistence behavior for durable WF Services Unifies persistence configuration and storage format for WCF and WF Can configure via IIS or PowerShell cmdlets Can use SQL Express or SQL Server Improved persistence schema with smaller footprint Persistence Durable services have the service persistence behavior enabled Services can persist on Unload or when Persist activities are executed Improved lock management improves availability of services Requests to an instance in use will be retried, not rejected Instance Management WF Services are more compelling with .NET 4 and Dublin Previously developers had to build a management UI to interact with WF instances Dublin supplies instance management controls via IIS Manager or PowerShell Can suspend, resume, abort or terminate workflow instances Can report on workflow instances Instance Management Durable instances traverse a variety of states during execution: Running, Blocked, Suspended, ReadyToRun Dublin tools provide control through a workflow control endpoint Can suspend, resume or terminate InstanceRestartService resets state of orphaned WF services DurableTimerService triggers WF service to wakeup after delay Locking Issues Client A Client B WFService Instance (Running) Locked Locking Issues Client A Client B WFService Instance (Running) Exception Locked Improved Lock Management Client A Client B WFService Instance (Running) WFService Instance (Running) Unlocked Locked Instance Restart Instance Restart Client A Client B WFService Instance (Running) WFService Instance (Running) Unlocked Locked Tracking and Monitoring WCF 4, WF 4 and Dublin together supply features for tracking and monitoring Increased visibility into WCF and WF Services Configure profiles to control tracking events emitted by WCF and WF Services Troubleshoot problems by monitoring tracking events via IIS Manager Generate tracking reports using PowerShell cmdlets or SQL views Tracking and Monitoring Enable/disable tracking on services Tracking profiles describe what to track Basic WF events, verbose WF events, or WCF activity tracing for correlation Custom profiles can add variable tracking Defined in XAML or code Tracking configurations associate profiles with tracking participants Configures service tracking behavior By default tracking data stored in the configured monitoring database Tracking and Monitoring WF Service Tracking Configuration Tracking Profile Config Tracking Behavior Tracking Participant Workflow Definition XAML Profile XAML Profile Monitoring Database Activities Activities Variables Variables Additional Points Dublin features are useful to durable and nondurable WCF services Deployment, monitoring, auto start Dublin provides model deployment from Quadrant (“Oslo”) solutions Dublin does not replace BizTalk Server Use BizTalk for integration adapters, transformations, analysis Dublin can host services accessible through the cloud (Azure) Summary: Hosting WCF and WF in Dublin Dublin provides an extensive tools and features to support WCF and WF services Enhances packaging, deployment, management, and monitoring Improves reliability, availability, and scalability Simple to use extensions to IIS Manager Powerful scripting capabilities Resources Michele’s Blog: http://www.dasblonde.net See post-conference blog posts for samples from this and other sessions at Tech Ed! Zoiner’s Blog: http://www.theworkflowelement.com Resources www.microsoft.com/teched www.microsoft.com/learning Sessions On-Demand & Community Microsoft Certification & Training Resources http://microsoft.com/technet http://microsoft.com/msdn Resources for IT Professionals Resources for Developers www.microsoft.com/learning Microsoft Certification and Training Resources Related Content Breakout Sessions (session codes and titles) Interactive Theater Sessions (session codes and titles) Hands-on Labs (session codes and titles) Hands-on Labs (session codes and titles) Track Resources Resource 1 Resource 2 Resource 3 Resource 4 Complete an evaluation on CommNet and enter to win! © 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.