Endpoint--Binding

1.What is Bindings?
    There are multiple aspects of communication with any given service. 
    There are many possible communication patterns:synchronousely/asynchronousely, bidirectional(双向),durable/volitile...
    There are many tranport protocols for the messages, such as HTTP(or HTTPS),TCP,P2P,IPC or MSMQ.
    There are a few possible message encoding opitions:you can choose plain text to enable interoperability, binary encoding to optimize performance.
    There are a few opitions for securing messages:you can choose not to secure them at all, to provide tranport-level security only, to provide message-level privacy and security,and of cs there are numerous ways for authenticating and authoring the clients.
    such as like that. there are many opitions you need to specify when the client consume the services from server.
    that's the use of Binding

The Standard Bindings
    WCF defines 9 standard bindings:
Basic binding
    offered by the BasicHttpBinding class. this is desinged to expose a WCF service as a legacy ASMX web service. so that old clients can work with the new services.
TCP binding
    offered by the NetTcpBinding class, this used TCP for cross-machine communication on the intranet. it supports a variety of features, includin reliability, transactions and security. and is optimized for WCF-to-WCF communication. As a result , it requires both the client and service to use WCF.
Peer network binding
    offered by the NetPeerTcpBinding class, this uses peer networking as a transport. 
IPC binding
    offered by the NetNamedPipeBinding class, this used named pipes as a transport for same-machine commucation. it it the most secure binding since it can not accept calls from outside the machine and it supports a variety of features similar to the TCP bindings
Web Service Binding
    offered by the WSHttpBinding class, this uses HTTP or HTTPS for tranport, and is designed to offer a variety of features such as reliability, transactions, and security over the internet.
Federated  WS binding
     offered by the WSFederationHttpBinding class, this is a specialization of the WS binding, offering support for federated security.
Deplex WS binding
    offered by the WSDualHttpBinding class, this is similar to the WS binding except it also supports bidirectional comminication fromm the service to the client.
MSMQ binding
    offered by the NetMsmqBinding class, this use MSMQ for transport and is designed to offer support for disconnected queued calls.
MSMQ intergration binding
    offered bu the MsMqIntegrationBinding class, this converts WCF messages to and from MSMQ messages, and is designed to interoperate with legacy MSMQ clients.

    table 1 Transport and encodin for standard bindings

having a text-based encoding enables a WCF service(or client) to communicate over HTTP with any other service(or client) regardless of its technoligy, Binary encoding over TCP or IPC yields the best performance but at the expense of interoperability, by mandating WCF-to-WCF comminication

the priciple to choose a bingding mechanism


    

转载于:https://www.cnblogs.com/Winston/archive/2008/04/16/1155516.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值