In today's SOAs, there is now a need for a "service
governance" tool to help manage SOA infrastructures. The Microsoft
Managed Services Engine (MSE), which was built by Microsoft Services and
is available on http://www.codeplex.com, helps address this need.
It is always easy to integrate
the initial application consuming a service. That's because the service
is typically built for that specific application. But as the 5th, 10th,
or even 50th application wants to join in using the service, any slight
change to the original service can have exponential impact on testing as
the number of consuming applications grows.
Changes to services are just
one of many problems that you'll encounter as service-oriented
architectures continue to grow. Without a common infrastructure focused
on manageability, most SOAs become an unwieldy mess of intertwined
services. These out-of-control services can end up negating the entire
benefit of a service-oriented architecture. That's where the Managed
Services Engine comes into play. It helps you gain and keep control over
services and manage their change over time.
1. The Problem with WSDL
In today's environment,
WSDL is static. It describes a service in its current form. Any changes
to the service require a new WSDL to be published. Depending on the
change, it can break existing applications.
To address this,
organizations typically don't change existing services but rather create
a duplicate method or possibly even a completely duplicate service. For
example, let's assume we have a math service that has the following
data contract:
[ServiceContract]
public interface IMathService
{
[OperationContract]
int AddIntegers(int IntegerA, int IntegerB);
}
This contract works fine for
the first application, but the next application may need to support
adding an array of integers. The only way to do add that support without
breaking the first application would be to add another version of the
same method that supports an array of integers. For example:
[ServiceContract]
public interface IMathService
{
[OperationContract]
int AddIntegers(int IntegerA, int IntegerB);
[OperationContract]
int AddIntegersArray(int[] Integers);
}
Although this example of adding
support for new requirements is overly simplified, the problem becomes
very large for both development teams and operationally as the number of
methods changes over time. Typically organizations won't even know
which applications use which version(s) of methods, so determining what
methods to deprecate can become overwhelming if not impossible due to
risk.
2. Where Does the MSE Help?
The Managed Services Engine
sits in front of all services and acts as governance tool for
understanding the end-to-end communication dependencies of all
applications and services. Quickly, administrators can easily see via
the Windows Presentation Foundation–based interface how components of
the SOA relate to each other. Figure 1 shows an example of the Managed Services Engine WPF interface.
The interface in Figure 1 is broken down into the groups described in Table 1.
Table 1. MSE User Interface Groups
Group | Description |
---|
Servers | A list of servers that are running the MSE software and can host WCF endpoints. |
Endpoints | A list of endpoints that can be hosted on one or more servers. |
Operations | A list of all operations that have been imported into the MSE. |
Resources | A list of all operation resources that have been imported into the MSE. |
Instances | A list of all service endpoints the MSE can communicate to. |
Systems | A list of all servers that endpoints are hosted on. |
Bindings | A list of all bindings used within the MSE, including default bindings. |
Policies | Policies
are a collection of assertions that define a behavior. For example,
there are default policies for turning off metadata publishing and
turning on service debugging. Policies contain XAML-based assertions
that when associated to an endpoint are programmatically called to
modify how an endpoint behaves. If we used MSE in the end-to-end
example, a policy could have been added to add the message-level
certificate requirements. |
Data entities | A list of all composite objects. |
Importing a WCF service into the MSE is as simple as running through a wizard. Start the wizard by selecting Tools Load Resources
Web Service Metadata. Provide the wizard with the URL to the web
service, and click Next to have MSE start reading the web service
metadata. Figure 2
shows that MSE has detected the schemas, resources, and operations that
are defined in the WSDL. The MSE will compare the schemas, resources,
and operations against what is already defined in its catalog repository
and import only the objects that are not yet defined.
Once you've imported all your
services, the MSE user interface will have filled all the groups with
their respective types. Clicking any object within the UI will then
filter all other groups to only the objects that are associated with the
selected object. The result provides a quick end-to-end "service map"
of how any single object is associated right from the service runtime
servers all the way to the backend-hosted servers. The service map is
all created with WPF animations to add extra visual effect.