WCF NetTCP绑定互联网 [英] WCF NetTCP Binding Over Internet

查看:119
本文介绍了WCF NetTCP绑定互联网的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题。我想成为一个系列WCF做服务的。消耗这些服务的客户端也是.NET与WCF。我想有高速的访问,响应速度快,运输中小型数据合同(主要.NET基本数据类型)。分配将超过互联网,I'm找可靠性,可用性和基本安全。

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.

我不希望使用WsHttp,因为我唯一的客户端基于.NET和我将有近150个客户端请求的服务。

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?

在此先感谢!

推荐答案

既然你打算使用简单类型和小型数据合同的的结合使用相比,通过去在互联网上推出的延迟几乎是无关紧要的。因此,正确的答案是的使用其中一个是最容易管理和最安全的的。

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.

我建议你的主机在IIS中的应用程序和使用的wsHttpBinding并采取一切可管理性善良随之而来的吧。它也将恰巧是可互操作的,虽然今天是无关紧要的,它仅仅是免费的,所以为什么不呢?

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

这篇关于WCF NetTCP绑定互联网的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆