Thursday 15 September 2011

What is End Point In WCF and How to select Exact Binding?


WCF Service is a program that exposes a collection of Endpoints. Each Endpoint is a portal for communicating with the world. The WCF communications are take place through end point.

The End point consists of three components:

 1. Address
 2. Binding
 3. Contract

The below figure illustrate the functions of Endpoint:
WCF End Point Architecture
 

1. Address:

 

      Basically URL, specifies where this WCF service is hosted .Client will use this url to connect to the service.
 e.g :-

 

2. Binding     

 

Binding will describes how client will communicate with service. There are different protocols available for the WCF to communicate to the Client. We can mention the protocol type based on your requirements.
 
A binding has several characteristics, including the following:

  • Transport -Defines the base protocol to be used like HTTP, Named Pipes, TCP, and MSMQ are some type of protocols.

  • Encoding (Optional) - Three types of encoding are available-Text, Binary, or Message Transmission Optimization Mechanism (MTOM). MTOM is an interoperable message format that allows the effective transmission of attachments or large messages (greater than 64K).


  • Protocol(Optional) - Defines information to be used in the binding such as Security, transaction or reliable messaging capability 
In WCF there are nine preconfigured bindings; each of these provides the means for a particular distributed computing need.
 
There are several factors that determine which binding to choose for a specific application, including security, interoperability, reliability, performance, and transaction requirements. 


The below image shows to select Binding based on the requirement.






 

Each of the bindings supports a particular communication scenario, such as cross- machine, on-machine, and interoperable communication using Web services


The following table gives some list of protocols supported by WCF binding.
Binding
Description
BasicHttpBinding
Basic Web service communication. No security by default
WSHttpBinding
Web services with WS-* support. Supports transactions
WSDualHttpBinding
Web services with duplex contract and transaction support
WSFederationHttpBinding
Web services with federated security. Supports transactions
MsmqIntegrationBinding
Communication directly with MSMQ applications. Supports transactions
NetMsmqBinding
Communication between WCF applications by using queuing. Supports transactions
NetNamedPipeBinding
Communication between WCF applications on same computer. Supports duplex contracts and transactions
NetPeerTcpBinding
Communication between computers across peer-to-peer services. Supports duplex contracts
NetTcpBinding
Communication between WCF applications across computers. Supports duplex contracts and transactions






 

No comments:

Post a Comment

Please Give Your Valuable Comments on this Topic

Archives