WCF 真的会取代 .NET Remoting 吗?

发布于 2024-09-07 18:39:52 字数 614 浏览 2 评论 0原文

我可以理解 WCF 一般来说比 Remoting 更好,但对我来说两者似乎很不同。 MS 制作了这张漂亮的图片来展示 WCF 是多么的伟大(或者其他技术人员可能是多么糟糕,只勾选了一个框): 替代文本
(来源:microsoft.com

但是, WCF 以 SOA 为中心,我认为假设每个网络应用程序都想要公开服务是不正确的。

就我而言,我正在寻找在不同 PC 上的服务器应用程序的两个实例之间复制对象的方法。 WCF 似乎只是提供了现代版本的 COM...获取一个对象并调用方法,然后它神奇地调用另一台 PC 上的版本。但远程处理似乎做了一些完全不同的事情,我不清楚为什么它被弃用而没有被类似的技术取代。

那么,微软是否声称远程处理已死?或者他们仍然支持它,承认它与 WCF 一起占有一席之地?

I can understand that WCF is in general better than Remoting, but the two seem quite different to me. MS make this pretty picture to show how great WCF is (or perhaps how poor the other techs are to only check one box each):
alt text
(source: microsoft.com)

But, WCF is centered around SOA and I don't think it's correct to assume every networked application wants to expose services.

In my case I'm looking at ways to replicate objects between two instances of a server application on different PCs. WCF appears to just give a modern version of COM... get an object and call methods and it magically calls the version on the other PC. But Remoting appeared to do something quite different and I'm not clear why it was deprecated without being replaced with a similar technology.

So, do MS even claim Remoting is dead? Or do they still support it, acknowledging it has its place alongside WCF?

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

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

发布评论

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

评论(1

晨曦÷微暖 2024-09-14 18:39:52

它确实取代了.Net 远程处理。您可以将二进制格式化程序与 Tcp 通道结合使用,并获得与远程处理相同的体验。

对于您的情况,远程处理似乎并不是真正正确的选择。如果你想复制对象,就像在不同的位置复制它们一样,那么你想序列化它们并将它们作为一个包(WCF 术语中的“消息”)发送到加载到一个类型(可以是相同的类型)中。在远程端点上键入相同的程序集,但部署在不同的服务器上)。这就是 WCF 的优势所在。远程处理将为您提供从一个端点到另一个端点到“实时”对象的连接。

It really does replace .Net remoting. You can use a binary formatter with a Tcp channel and get the same experience as remoting.

For your case, remoting doesn't really seem to be the right choice. If you want to replicate objects, as in make copies of them in a different location, then you want to serialize them and send them as a bundle (a "message" in WCF lingo) to be loaded into a type (could be the same type in the same assembly, but deployed on a different server) on the remote endpoint. This is where WCF excels. Remoting would give you a connection to a "live" object from one endpoint to the other.

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