Architecture Diagram

AppFabric is an evolution of the Windows Process Activation service (WAS) and the Application Server role in Windows Server to host and manage WCF and WF services. As such, AppFabric is closely aligned with .NET Framework 4 and makes use of several features that are provided as part of the Framework offering key functionality such as persistence, monitoring, and hosting of WCF and WF services. AppFabric also integrates with Internet Information Services (IIS) providing management and monitoring tools within the IIS management console.

The following architectural diagram shows the parts of AppFabric as well as the .NET Framework 4 and IIS components that are used by AppFabric:

Architecture overview illustration

In this topic, we will walk through the AppFabric architecture by providing further detail about each of the technologies described in the architecture diagram.

Enhancing the Windows Process Activation Service

Since the architecture diagram displays the base technologies that AppFabric is built on at the bottom, we begin there with IIS and WAS.

IIS and WAS

The foundation on which AppFabric is built is the robust hosting environment provided by IIS and WAS. Hosting applications within WAS provides several features that are desirable for a service-oriented architecture (SOA) such as:

  • Message-based activation of applications that allows applications to start and stop dynamically in response to incoming messages.

  • Robust application and worker process recycling to maintain the health of running applications.

  • Application configuration and management.

  • Organization of applications into sites for the purposes of addressing and management. At run time, applications are associated with application pools that define runtime process boundaries.

For all the features provided, however, deployment, management, and monitoring of WCF and WF services is not addressed and the burden falls on the application developer to provide a deployment vehicle, management guidance, and custom monitoring solutions. Also, it is challenging to host a long-running process such as a workflow in IIS and WAS due to on-demand activation and process recycling. State persistence and host activation must be explicitly configured by the developer if required by the application. AppFabric addresses these shortcomings by providing tools and services that enable you to easily deploy and monitor applications, as well as to configure features of the hosting environment.

Run-Time Services and Components

AppFabric provides services, such as persisting the state of a long-running workflow to a persistence store, content-based routing, and configuration-based activation.

ASP.NET

Many of the basic features that make the WAS hosting environment attractive, such as application domains, life-cycle management, health monitoring, common configuration system, and dynamic compilation are provided by ASP.NET. ASP.NET also provides message-based activation for WCF and WF services that receive messages using HTTP.

WCF and WF

WCF and WF services provide the building blocks for creating SOA applications, and are the focus of AppFabric. WCF provides a unified programming model for developing SOA applications that communicate across the Web, including interoperability with applications built by using other technologies. WF provides a workflow engine that can be used to implement long-running processes.

For more information about WCF and WF, see Windows Communication Foundation and Windows Workflow Foundation.

Run-Time Databases

When implementing state persistence for executing applications, or capturing monitoring information, one of the first considerations is the storage medium for the data. It is especially critical for SOA applications that this data store be robust, secure, scalable, and highly available. Since your applications may consist of components running on multiple servers in a farm, the data store must also be easily accessible from multiple servers simultaneously.

To meet these criteria, AppFabric stores all persistence and monitoring information in a data store.

Note

By default, both persistence and monitoring data are stored within the same database. However, you can partition the data into separate databases or even create additional persistence and monitoring databases for specific applications.

For more information about the databases used by AppFabric, see Database Administration.

Persistence

One of the challenges of hosting an application is ensuring that the application is able to withstand events such as system failures or restarts. AppFabric accomplishes this by using a persistence provider that allows WF services to save their state to the persistence database, and then resume execution on a healthy system in the event of a system failure or restart.

Beyond providing durability for system failures or restarts, long-running WF services can suspend during normal execution to free resources for other applications and resume operation when a message arrives that must be processed by a persisted workflow instance. WF services can also be triggered to resume after a specific interval by using a durable timer that monitors the “run at” indicator on persisted WF instances and resumes the instance.

For more information about persistence, see Persistence Concepts.

Hosting

AppFabric integrates the ServiceHost (host WCF) and WorkflowServiceHost (host WF) service hosting environment with IIS and WAS. For example, both hosts participate in graceful appDomain shutdown and recycling, as well as application auto-start processes.While the combined functionality of IIS and WAS provides a robust hosting environment for WCF and WF applications, to take advantage of these features often requires considerable effort on the developer’s part to deploy and configure an application. AppFabric provides a comprehensive set of tools that allows applications to be configured in a standard fashion, without the need for custom deployment solutions or manual configuration procedures.

For more information about how AppFabric leverages IIS and WAS technologies, see Hosting Concepts.

Monitoring

Due to the loosely coupled and distributed nature of solutions built using WCF and WF services, monitoring and troubleshooting is often a difficult process that requires viewing each individual service and then manually correlating the observed events in order to obtain an overall view of what is going on within the application. With AppFabric, events are collected and correlated from a variety of sources to provide a holistic view into the execution of a running process. This data is stored into a database, where it can be retrieved by using either the monitoring tools hosted in the IIS Management console, or the ApplicationServer module for Windows PowerShell cmdlets.

For more information about monitoring, see Monitoring Concepts.

Management APIs

To support a wide range of management scenarios, AppFabric provides access to all management functions through the ApplicationServer module for Windows PowerShell as cmdlets. This implementation gives you a number of ways to use the management functionality, such as invoking cmdlets interactively from the Windows PowerShell command-line shell, creating scripts that invoke cmdlets, or invoking cmdlets from within a custom application.

For more information, see Management Tools.

IIS Manager

In order to provide centralized configuration and management of your WF and WCF services, AppFabric provides a rich management and monitoring toolset for WCF and WF services within IIS Manager. AppFabric also uses MSDeploy to deploy services into the WAS hosting environment. You can use MSDeploy to deploy applications containing WCF and WF services.

Note

All functionality exposed in the IIS Management console is based on the ApplicationServer module for Windows PowerShell, and is implemented as Windows PowerShell cmdlets. All tasks performed in the AppFabric user interface can therefore be scripted.

For more information about the AppFabric extensions to IIS Manager, see Management Tools.

Visual Studio

Visual Studio 2010 provides a rich development environment that you can use to create applications containing WCF and WF services. Visual Studio 2010 also supports directly testing your services within AppFabric when pressing F5, and provides the ability to create deployment packages for your project, which can be imported directly through MSDeploy into an AppFabric environment.

For more information about Visual Studio 2010, see Visual Studio 2010. For more information about using Visual Studio 2010 with AppFabric, see the following topics:

See Also

Concepts

Architectural Overview