Part of the evolution of the ASMX stack and part of the
unification of all distributed development technologies is a set of service
runtime behaviors that is unprecedented. Here are some of the most interesting
additions.
1. Instancing
Control: WCF services can control how they are instanced by specifying
Singleton, Private Session, Shared Session, and Per Call. Today we really only
have the ability to do Per Call instancing in ASMX. This provides a much
greater set of capabilities for designing services.
2. Concurrency:
A service will specify whether the concurrency is Single, Multiple, or
Reentrant. Of course, this flexibility comes with some pitfalls. You have to
understand some of the limitations of the other settings. For example, if you
are setting your instancing to per-call, you cant use anything other than
single threading.
3. Throttling:
A service is able to control through configuration the number of incoming
threads it will accept. This allows runtime control over how many resources
are consumed on a host environment.
4. Error
Handling: WCF services have a configuration switch that specifies whether
errors should be sent to the client or not. This is something you would use
only for problem diagnosis; when used carefully, this could give important
details in the event of a failure.
5. Transactions:
Transaction flow is a capability of WCF services. This is dependent on the
binding that is chosen, but there is support for transaction flow across
services calls.
6. Security:
The security features available to WCF services vary based on your bindings.
There is message level security that enables message encryption. There is also
transport level security that depends completely on the specified binding. In
some cases, Windows security is your only option; in other scenarios
WS-Security will apply.
7. Metadata:
WCF services provide the facility to enable or disable metadata publishing as
well. Services can specify whether they want to respond to HTTP GET request
with an MEX endpoint and/or WSDL.
So How Do These Features Help Me Build Service-Oriented
Systems?
The service behaviors listed above do not all map directly
to the needs of a service-oriented developer. Although supporting SO development
is a key objective for WCF, it is not the only objective. Another goal would
seem to be to provide a unified robust set of features that enable distributed
development on the Microsoft platform. Many of the features above are giving
administrators more control of how a service behaves after deploying to a
production environment. It is probably unfair to look at these service
features and pass judgment based on how immediately they might be able to
facilitate SO development. The root of most of these features is based on the
unification of the disparate technology stacks and the implementation of the
lessons learned from ASMX, WSE 1, and WSE 2.