The routing service that comes with WCF 4 enables you to make a single up-front layer for accessing back-end services.
The basic concept is that you define endpoints for your router service to be accessible by consumers as well as the internal client endpoints the router service will call the back-end services with.
This shields clients from having to know about the physical findings of the back-end services, allowing you to implement useful things such as versioning, virtualization, protocol bridging, routing, PEP and back up lists (call a different service if the main one is down)
In addition, the routing service supports preserving sessions, impersonating a client's windows token to delegate the client credentials and transaction propagation.
The endpoints that you expose in your router service are defined with the channel shape that you desire.
- ISimplexDatagramRouter / ISimplexSessionRouter – Represents one-way operation invocations. (the session router requires a sessionful channel)
- IRequestReplyRouter – Represents R/R operations
- IDuplexSessionRouter – Represents duplex communication channel. The channel defines a callback contract for pushing response messages to the channel of the caller
Soap Processing Mode:
The routing service can be configured to have soap processing enabled which makes the protocol bridging possible.
This approach makes the router service as a processing service rather than a simple pass-through service which simply forwards the incoming message to the physical service.
If you wish to disable soap processing mode, make sure the communication pattern is compatible with this mode.
For example, standard NetTcp binding is supported but NetTcp with reliable session enabled is not.