.NET Remoting 如何处理 Remoting 服务器端的 IP 地址更改

发布于 2024-10-03 14:13:58 字数 153 浏览 1 评论 0原文

前提条件 - 远程服务器和客户端都已设置,客户端能够通过客户端激活的业务对象调用方法并从服务器端接收事件。

更改远程服务器的IP地址,同时保持服务器和客户端运行,客户端仍然能够执行上述任务。

这很棘手。

编辑: 设置通道时,bindTo 被删除

Precondition - the remoting server and client are both setup, the client is able to invoke methods and receive events in/from the server side by client-activated business object.

Change the ip address of remoting server with keeping the server and client running, the client is still able to do the above tasks.

This is tricky.

EDIT:
bindTo was removed when setting the channels

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

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

发布评论

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

评论(2

诗笺 2024-10-10 14:13:58

来吧,现在是 2010 年了...让它成为一个 WCF 应用程序吧。

要回答您的“性能”问题,请查看线程 WCF 与 .NET 远程处理的性能

WCF 与其他以前的通信技术之间的全面比较这里

通过使用 WCF,您可以避免一些令人头痛和听力下降的情况。这是一个安全的赌注,让我向你保证,你不会后悔的。

引用 Saurabh Gupta(MS 的 WCF PM):

将使用 ASP.NET Web Services、WSE、.NET Enterprise Services 和 .NET Remoting 编写的分布式应用程序迁移到 WCF 时,性能至少与其他现有的 Microsoft 分布式通信技术相当。在大多数情况下,WCF 的性能明显优于其他现有技术。 WCF 的另一个重要特性是吞吐量性能本质上可以从单处理器扩展到四处理器。

总而言之,WCF 比 ASP.NET Web 服务快 25% - 50%,比 .NET Remoting 快约 25%。与 .NET Enterprise Service 的比较取决于负载,因为在一种情况下 WCF 快了近 100%,但在另一种情况下却慢了近 25%。对于 WSE 2.0/3.0 实现,将它们迁移到 WCF 显然将带来近 4 倍的最显着性能提升。

C'mon, it's 2010... make it a WCF app already.

And to answer your "performance" concern check out the thread Performance WCF vs .NET remoting

Full comparison between WCF and other previous communication technologies HERE

You are going to save yourself from some headaches and hear-pulling scenarios by going WCF. It's a safe bet and let me assure you, you'll not regret it.

Quoting Saurabh Gupta (WCF PM at MS):

When migrating distributed applications written with ASP.NET Web Services, WSE, .NET Enterprise Services and .NET Remoting to WCF, the performance is at least comparable to the other existing Microsoft distributed communication technologies. In most cases, the performance is significantly better for WCF over the other existing technologies. Another important characteristic of WCF is that the throughput performance is inherently scalable from a uni processor to quad processor.

To summarize the results, WCF is 25%—50% faster than ASP.NET Web Services, and approximately 25% faster than .NET Remoting. Comparison with .NET Enterprise Service is load dependant, as in one case WCF is nearly 100% faster but in another scenario it is nearly 25% slower. For WSE 2.0/3.0 implementations, migrating them to WCF will obviously provide the most significant performance gains of almost 4x.

×眷恋的温暖 2024-10-10 14:13:58

.NET Remoting 比 WCF 更快的唯一场景是在同一进程中的应用程序域之间远程处理数据以及序列化 ADO.NET DataSet 对象时。

除此之外,WCF 几乎总是更快:Windows Communication Foundation (WCF) 的性能比较)与现有的分布式通信技术

此外,当托管在 IIS 中时,WCF 服务会自动映射到网络连接的新 IP 地址。对于 .NET Remoting 则不然。

虽然某些现有应用程序继续使用 .NET Remoting,但它已被弃用,您应该意识到您编写和部署的任何 .NET 代码在某些时候都需要替换。最好现在就移植到 WCF,而不是等到最后期限到来时再移植。

The only scenarios where .NET Remoting is faster than WCF are when remoting data between appdomains in the same process and when serializing ADO.NET DataSet objects.

Other than that, WCF is almost always faster: A Performance Comparison of Windows Communication Foundation (WCF) with Existing Distributed Communication Technologies:

Further, when hosted within IIS, WCF services are automatically mapped to a network connection's new IP address. The same cannot be said for .NET Remoting.

While some existing apps continue to use .NET Remoting, it is deprecated and you should realize that any .NET code you write and deploy will at some point need to be replaced. Better to do the port to WCF now rather than later when you're up against a brick-wall-deadline.

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