WCF,4.0,双向

发布于 2024-09-01 08:59:56 字数 266 浏览 6 评论 0原文

....NET 4.0 现在有哪些选项可以支持客户端的 NAT(即 NAT 后面的客户端)。

我更喜欢使用基于 HTTP 的东西,但这是一个弱条件 - 我认为中期我无论如何都会在 WCF 之外进行一些非 http 通信,因此代理遍历是我可以延迟的事情。

在 .NET 4.0 之前,存在一个问题,即基本上服务器->客户端通道将从服务器打开,这使得 NAT 不可穿越。

轮询是不可接受的 - 我们在这里谈论时间敏感的信息。

那么,我现在有什么选择呢?

...what options are there now with .NET 4.0, in a way that does support NAT for the client side (i.e. client behind NAT).

I would prefer to use something HTTP based, but that is a weak condition - I think mid term I will have some non http communication outside WCF anyway, so proxy traversal is something I could delay.

Pre .NET 4.0 there was the issue that basically the server->client channel would be opened from the server, which made NAT something non-traversable.

Polling is not acceptable - we talk time sensitive information here.

So, what are my options now?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

Saygoodbye 2024-09-08 08:59:56

您可以从客户端打开连接并保持打开状态。
或者将 NAT 上的端口转发到客户端,因此连接到 NAT:34823 将转到 192.168.xxx.xxx:80。
或者付微软一些钱来使用他们的服务总线,但它还没有完全完成,未来也不确定。
或者进行一些巧妙的修改,在客户端和服务器上安装 Skype,通过 API 发送消息。

You can open a connection from the client and just keep it open.
Or forward ports on NAT to clients, so connecting to NAT:34823 will go to 192.168.xxx.xxx:80.
Or pay Microsoft some money to use their Service Bus, which is not exactly finished and with uncertain future.
Or do some clever hack, install Skype on both clients and servers, send your messages trough the API.

心如荒岛 2024-09-08 08:59:56

这并非特定于 .net 4.0,但您可以使用 Windows Azure 服务总线。

如果您的应用程序需要
双向连接您
实际上有两个选择:要么
你押注于可用的解决方法
并承担后果(如
BitTorrent 可以)或者您构建并
运营某种形式的中继服务
您的申请。中继服务
接受并维护来自的连接
受防火墙和/或 NAT 处理的客户端和
在它们之间路由消息。
几乎所有聊天都是即时的
消息传递、视频会议、VoIP、
和多人游戏应用程序
和许多其他流行的互联网
应用程序依赖于某种形式
中继服务。

中继服务面临的挑战是
它们非常难以建造
以他们可以提供的方式
在他们需要的地方进行互联网规模化
数千甚至数千之间的路线
数以百万计的连接作为大
即时通讯网络可以。和
一旦你有一个可以支持的中继
如此规模,其价格极其昂贵
来操作。事实上如此昂贵
所需的投资和
由此产生的运营成本是
对于广大群众来说完全遥不可及
大多数软件公司。这
连接挑战是一个真实的挑战
创新阻碍者并代表了
显着的进入壁垒。

好消息是 Microsoft .NET
服务总线提供一系列
双向、点对点
连接选项包括中继
沟通。你不必构建
您自己的或自己经营的;你可以使用
这个构建块代替。 .NET
服务总线涵盖四个逻辑
功能领域:命名、注册表、
连接性和事件。

http://vasters.com/clemensv/PermaLink, guid,92d78bee-2cfd-4a29-95ab-c5abb9b905e7.aspx

This is not specific to .net 4.0, but you could use Windows Azure Service Bus.

If your application requires
bi-directional connectivity you
effectively have two choices: Either
you bet on the available workarounds
and live with the consequences (as
BitTorrent does) or you build and
operate some form of Relay service for
your application. A Relay service
accepts and maintains connections from
firewalled and/or NAT-ed clients and
routes messages between them.
Practically all chat, instant
messaging, video conferencing, VoIP,
and multiplayer gaming applications
and many other popular Internet
applications depend on some form of
Relay service.

The challenge with Relay services is
that they are incredibly hard to build
in a fashion that they can provide
Internet scale where they need to
route between thousands or even
millions of connections as the large
Instant Messaging networks do. And
once you have a Relay that can support
such scale it is incredibly expensive
to operate. So expensive in fact that
the required investments and the
resulting operational costs are
entirely out of reach for the vast
majority of software companies. The
connectivity challenge is a real
innovation blocker and represents a
significant entry barrier.

The good news is that Microsoft .NET
Service Bus provides a range of
bidirectional, peer-to-peer
connectivity options including relayed
communication. You don't have to build
your own or run your own; you can use
this Building Block instead. The .NET
Service Bus covers four logical
feature areas: Naming, Registry,
Connectivity, and Eventing.

http://vasters.com/clemensv/PermaLink,guid,92d78bee-2cfd-4a29-95ab-c5abb9b905e7.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文