.NET远程与WCF [英] .Net Remoting versus WCF

查看:256
本文介绍了.NET远程与WCF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,我可以从两个.NET远程处理和WCF做同样的事情,那么为什么WCF是更优先于.Net远程。我在哪里可以选择(或在何种情况下).Net远程或WCF?

I am wondering that I can do same thing from both .net remoting and WCF, then why WCF is more preferred over .Net remoting. Where can I choose (or in which situation) .Net remoting or WCF?

推荐答案

.NET远程应用程序可以使用HTTP,TCP和SMTP协议,而 WCF 可以使用命名管道和MSMQ以及连同所有这些协议。

.NET Remoting applications can use the HTTP, TCP, and SMTP protocols whereas WCF can use named pipes and MSMQ as well along with all these protocols.

你可以在这里找到最佳答案:从.NET远程的Windows通信基金会

You may find the best answer here: From .NET Remoting to the Windows Communication Foundation

结论

正如你所看到的,从.NET远程到WCF迁移不是一个任务
你要害怕的。对于大多数应用,一个简单的三步
的过程可以把你的应用程序到新的平台。在大多数情况下,
你只需要标记为
[的ServiceContract]和[OperationContract的],用
[DataContract]和[DataMember]标注你的数据结构的接口的合同,也许改变一些地方您的
活化模型是基于会话的代替客户端激活
对象。

As you have seen, a migration from .NET Remoting to WCF is not a task you have to be afraid of. For most applications, a simple three-step process can bring your application to the new platform. In most cases, you will only have to mark your interface contracts with [ServiceContract] and [OperationContract], your data structures with [DataContract] and [DataMember] and maybe change some parts of your activation model to be based on sessions instead of client-activated objects.

如果你决定要充分利用Windows通讯基础,从
.NET远程到WCF完整迁移的功能
的因此应为
大多数应用一个相当简单的任务。

If you decide that you want to take advantage of the features of the Windows Communication Foundation, the complete migration from .NET Remoting to WCF should therefore be a rather easy task for the majority of applications.

您可能也发现两者之间的性能差异在 Windows通讯基础(WCF)与现有的分布式通信技术

You may also find the performance difference between the two in A Performance Comparison of Windows Communication Foundation (WCF) with Existing Distributed Communication Technologies

在与迁移的ASP.NET Web
服务,WSE,.NET企业服务和.NET Remoting来写WCF分布式应用程序中,
性能对其他现有的Microsoft
配电通信技术的至少相当。的在大多数情况下,其性能
是WCF比其他的现有技术显著更好。
的WCF的另一个重要特点是,可以通过
性能是从一个单处理器四
处理器固有可缩放

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.

要总结成绩,WCF是25%,比的ASP.NET Web
服务快50%,比.NET远程<快大约25%/ STRONG>。比较
与.NET企业服务是负载有关,因为在一种情况下WCF是
近100%的速度更快,但在另一种情况是慢了将近25%。
。对于WSE 2.0 / 3.0的实现,将它们移植到WCF将明显
提供了几乎4倍的最显著的性能提升。

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.

这篇关于.NET远程与WCF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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