开发者

WCF NetTCP Binding Over Internet

I have a question. I would like 开发者_开发百科to serve a series of services made with WCF. The client that consumes the services is also .NET with WCF. I would like to have high speed of access, fast response, transport medium to small Data Contracts (primary .net basic data types). The distribution will be over internet, I´m looking for reliability, availability and basic security.

I don´t want to use WsHttp, because my only client is based on .net and I will have almost 150 clients requesting the services.

What do you suggest to use for binding? Are there any disadvantages, risks, etc?

Thanks in advance!


Since you plan to use simple types and small data contracts, the binding you use is nearly irrelevant compared to the latency introduced by going over the Internet. So, the right answer is to use the one which is easiest to manage and the most secure.

I recommend that you host the app in IIS and use a wsHttpBinding and take all the manageability goodness that goes along with it. It will also happen to be interoperable, and while that is irrelevant today, it is just free, so why not?

And, please consider the granularity of your service. You know your customers better, but on the wide open Internet, stuff happens. Because the round trip time over the Internet is variable and impossible to control, it could take milliseconds or seconds or may not get there at all. So, you should take fewer trips with larger payloads if possible, and use all sorts of caching and async operations to make the app appear "fast".


There is a good article on choosing a binding by Juval Lowy here:

http://www.code-magazine.com/article.aspx?quickid=0605051&page=3

Generally the advice is not to use net tcp binding over the internet. Have not heard of anyone doing it. Although it may work if the ports are open all the way and no one blocks the calls.

Test it with nettcp, if it does not work you just need to change the configuration.

The most important thing is to consider your security needs. Do you just need point to point, then basichttp over ssl. Do you need end to end, then wshttp with message encryption.


According to your scenario, NetTcpBinding is the binding of choice. As you are sure that client will be WCF, no need for interoperability.

Have a look here in Programing WCF Services book.

The only thing I'm not sure about is firewalls. If you have to get trough on of theses, maybe some WS binding could be more appropriate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜