views:

888

answers:

3

Hello.

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!

A: 

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.

Philippe
Thanks Philippe for your response.I will not have interoperability, how ever if this happens I can multiple binding configured the services. Until now it is only planned to be consumed by a .net windows form app, the channel will be internet. We have firewalls but the Telco guy can configure the port to be accessed from certain IP, the branch offices have dedicated internet connection, so, security is not a main concern.I´ll take a look to that book.
Arturo Caballero
+1  A: 

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.

Shiraz Bhaiji
Thanks ShirazUntil now it is only planned to be consumed by a .net windows form app, the channel will be internet. We have firewalls but the Telco guy can configure the port to be accessed from certain IP, the branch offices have dedicated internet connection, so, security is not a main concern
Arturo Caballero
IP addresses can be spoofed easily, and this would be very susceptible to a man in the middle attack. If your data is valuable, encrypt it over the Internet. A cheap, simple solution to this problem without dedicated lines is to use a VPN.
Jerry Bullard
+3  A: 

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".

Jerry Bullard