Dublin – More than just a town in Ireland

What is Dublin?

An easy way to host Windows Communication Foundation (WCF) and Workflow applications

If you don't know what WCF is, see https://en.wikipedia.org/wiki/Windows_Communication_Foundation

For Workflow (WF), see https://en.wikipedia.org/wiki/Workflow

Of course Microsoft has many different links on these topics as well.

Better scaling and manageability

Operates within IIS

 

When and How Available

Visual Studio 2010 plus 3 months

Available in download format

 

What customers have been asking for

"I want to get my WF and WCF services up and running easily - Why doesn't it just work?"

"I want to easily monitor and control running WF and WCF services."

"I really want better tooling and scripting."

"I want built-in extensions for
enterprise-readiness." – RSP: Reliability, Scalability, Performance

It takes a lot of work

Long running durable services is tough. Making Workflow applications persist over long periods of time requires a great deal of configuration. Stop, start, pause, delete – all things that are tough to monitor and control without a lot of code.

State can be "Durable" or "Stateless"

A stateless service is a transient one.

When the service is processing a request it keeps that service instance in memory until it's finished, and there's no state kept between requests.

Think of a service that sends text messages.

This service receives a request, sends the text message, and finishes.

Each request is independent; the service does not need to maintain any state

Durable services, on the other hand, maintain state between requests and are often long-running.

Service instance state is persisted, to a database, for example.

This allows the instance to be removed from memory when it's not active and allows the state to be reconstructed if the host process should die.

Think of a loan processing service.

There are many steps, and the process takes weeks.

More than UI Tools

Customers want more than just UI tools. They want scripts even if there are great UI tools. Also, customers want the tools to work within Visual Studio. They don't want to learn a brand new tool; it should integrate with an existing tool.

The Result is Dublin

That is one of the points of Dublin. Customers want to be sure things are working, be able to monitor them, and validate performance.

 

Diagram – Big Picture

IIS has been updated

It used to have a feature called WAS, the Windows Activation Service. Now it is called the Process Activation Service. It allows IIS to automatically kick off a workflow process when a client participates in a workflow activity.

 

How to create these services (WCF and WF)

Visual Studio used to create services.

Oslo allows you to do declarative development.

With Oslo, Models will be stored in a repository and hydrated into an environment.

Windows Server Contains:

IIS/WAS

.NET Framework

Dublin

WF and WCF Services

Admin Tools (scripting tools)

 

What will the WF and WCF Frameworks provide?

Hosting

Within IIS and allow for automatic activation

Durable Timer Service

Manages the lifecycle of a service. Process can go away and

Discover Service

Tell what service are available on a server.

Persistance (Durable Services)

Be able to maintain long running state, perhaps for weeks at a time.

SQL Persistance Provider

You can extend the provider and the schema. Extension have been added to the persistance mechanism.

Monitoring

How is are things behaving? What is the state? Can you pause, start, etc?

WF SQL Tracking Provider & WCF SQL Tracking Behavior

As workflows execute, the tracking service can be configured to automatically emit information about the flow of control within the workflow, and this information can be stored in an external store, such as a SQL Server database, for querying.

This allows various applications, from custom applications to business analytic tools, effectively to "look inside" workflows and query their status, or determine which are blocking on specific external events.

This surfacing of tracking information is essential in creating the transparency that workflow solutions require.

Messaging

Flexible messaging scenarios. A pipeline receives a message and transforms into to a meaningful XML to be routed or executed as a business process – as has been defined by the developer.

Forwarding Service

A central service endpoint that can dynamically distribute the message to the correct WCF service by executing different permutations of a WCF message filter.

This can be easily done by configuring a custom Dublin's forwarding servic

Tooling – Functionality Provided by Microsoft

Visual Studio (WF and WCF Project Templates)

A new workflow designer added to Visual Studio 2010 provides a compelling graphical user experience for many of the key WCF and WF features.

VS 2010 will include bread-crumb trails for going back in scope, in-place activity editing (reducing the need for the Properties window), zoom capabilities, and overview navigation

IIS Manager (WF / WCF Management Modules)

Will allow you to have greater management capabilities.

Configuring Persistence and Tracking

Once you've successfully deployed an application, you can begin configuring your services through the other extensions provided by "Dublin." For example, in some situations, the system administrator may need to manually reconfigure the runtime configuration for the persistence and tracking databases.

"Dublin" extensions

Simply select Services from the default view and then you'll see a list of all managed services, along with a right-hand pane that exposes various service configuration option.

Easing migration to production

Notice we have an Application Export and Application Import. This facilitates going from Dev to Test to Production. A zip file is created that can be used to move the entire workflow service.

Database template

Creates a starter database with a database string

Tracing through Diagnostics

Assists debugging and finding what is occurring within the Workflow.

Services

Disc

Tracking Configuration

The designer of a workflow or activity might not want to track every single piece of information about a running workflow instance, but instead might be interested in only a subset of events.

Every running workflow instance is created and maintained by an in-process engine referred to as the Workflow Runtime Engine.

The execution of the workflow can be tracked using the workflow tracking infrastructure.

When a workflow instance executes, it sends events and associated data to tracking services that are registered with the workflow runtime.

Tracking Service

Tracking service is responsible for providing a tracking profile and a tracking channel to the tracking runtime.

Using the tracking profile, runtime provides the events and data emitted from the workflow instances to the tracking service.

Various events can be tracked with this facility: Workflow events, Activity events, and User events.

Workflow events describe the life cycle of the workflow instance.

Workflow events include Created, Completed, Idle, Suspended, Resumed, Persisted, Unloaded, Loaded, Exception, Terminated, Aborted, Changed, and Started

Activity Events

Activity events describe the life cycle of an individual activity instance.

Activity-execution status events include Executing, Closed, Compensating, Faulting, and Canceling.

When creating the business logic for an activity, the activity author might want to track some business- or workflow-specific data

User Events

Events generated by the interaction of a user into the workflow.

Tracking Profile

Tracking services often must track only a subset of the workflow information.

This is achieved using tracking profiles.

Configuration of a Service

The user interface giving you visibility into:

Persistence

Tracking

Certificates

Throttling

 

You will have access to a dashboard view that provides an overview of the running workflow instances that have been persisted and potentially suspended:

Instances running

Instances blocked

Instances Ready-to-run

Instances Suspended

You can View the list of persisted instances and to view their details.

Basic dashboard is provided

You can suspend, terminate, or abort service instances manually by selecting from the actions shown in the right-hand pane.

Suspending a service instance stops the execution of the instance and prevents it from receiving new messages.

Suspended instances can later be resumed, at which point they'll begin receiving messages again.

Terminating a service instance stops the execution of the instance and removes it from the persistence store, which means it cannot be resumed.

Finally, aborting a service instance clears the in-memory state pertaining to the given instance and reverts back to the last persistent point (which is stored in the persistence store).

Management APIs (Powershell command-lets)

All of the features addressed above are also available view scripting code.

 

Quick Demo

Let's assume we wish to implement the following:

 

Start a new project in VS2010

Warning: The screen captures are of poor quality

New Project = Application Server

Editing and Creating WCF Contracts in User Interface

Bindings are also editable in a graphical interface

Right within Visual Studio 2010's WF Designer this information can be added/edited/updated