Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Azure

SOA with .NET and Windows Azure : WCF Extensions - WCF Extensibility

5/22/2011 11:34:52 AM
- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
The WCF platform provides built-in support for a range of distributed communication protocols, including transport and message encoding protocols using channel bindings.

Available channel bindings include:

  • protocol channel bindings that determine security, reliability and context flow settings

  • transport channel bindings that determine the underlying transport protocol (including TCP and HTTP)

  • message encoding bindings that determine the encoding at the wire (including text/XML, binary, and MTOM)

Although these default channel bindings will cover common communication scenarios, there may be certain requirements that can only be accommodated via further customization. For this purpose, WCF provides an extensibility model with several extension points.

Before we explore the extensibility model, we first need to establish how WCF can be represented with two fundamental architectural layers.

WCF Layers

As shown in Figure 1, WCF is partitioned into two main layers: the service model layer and the channel layer.

Figure 1. WCF includes the service model layer and the channel layer.


The service model layer essentially provides a programming model that enables solutions to use WCF. For example, all the information about user-defined service contracts is found in this layer.

Underneath the service model layer is a shared message layer used as the transport and also known as the channel layer. The channel layer provides several communication channels and is also known as the channel stack. Addresses and bindings defined in the service model layer provide the mechanisms used to control the channel stack. Bindings define the transport and addresses define the destinations of messages.

Layered Extensibility

Figure 2 further expands on the layered view by illustrating how the proxy and dispatcher relate to the service model layer and represent touch points for services. You’ll notice that underneath the proxy and dispatcher are the protocol and transport channel stacks. The protocol channels are used to process SOAP messages, add security, and add and remove headers, whereas the transport channels are used to send and receive messages.

Figure 2. WCF can be extended at the service model layer and channel layer.


WCF is extensible at the service model layer and at the channel layer. If you need to make changes that affect service behavior, then you need to ensure that service model extensibility is used. If the requirement affects changes to the message at the wire level, channel layer extensibility is used.

Channel Layer Extensibility

The WCF channel extensibility model can be used to extend channels for non-supported transports such as UDP and SMTP or other custom and proprietary transports. Specifically, this form of extensibility at the channel layer allows for:

  • the creation of new transports

  • integration with incompatible and proprietary systems

  • implementation of custom infrastructure protocols

The ability to create and extend WCF with new transports can be used to simplify integration between incompatible systems. For example, WCF channels can be customized to talk RMI on the wire in order to integrate with a Java application. Channel layer extensibility also allows for the creation of custom infrastructure channels, such as proprietary SOAP-level compression.

In the next example, the address, binding and contract are set and associated with a host. The binding indicates the runtime is going to construct a channel stack optimized for TCP with binary as the message encoding for efficient message transfer. The host.Open(); statement invokes channels and channel listeners to enable communication.

Example 1.
ServiceHost host = new ServiceHost(typeof(MyService));
Uri address = new Uri("net.tcp://temp/service/endpoint");
Binding binding = new NetTcpBinding();
Type contract = typeof(IContract);
host.AddEndpoint(address, binding, contract);
host.Open();
Other -----------------
- SOA with .NET and Windows Azure : WCF Extensions - WCF Discovery
- Service-Orientation with .NET : Entity Abstraction with a .NET REST Service
- Service-Orientation with .NET : Utility Abstraction with a .NET Web Service
- Service-Orientation with .NET : Service Reusability and the Separation of Concerns
- Service-Orientation with .NET : Service Discoverability
- Service-Orientation with .NET : Exception Shielding
- Service-Orientation with .NET : Service Abstraction & Validation Abstraction
- Service-Orientation with .NET : Service Loose Coupling and Service Capability Granularity
- Service-Orientation with .NET : Service Façade
- Service-Orientation with .NET : Decoupled Contract
 
 
25 Inspiring Game of Thrones Quotes
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
programming4us
Natural Miscarriage
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Game Trailer