本文介绍了是否有一个可行的对手在.NET中DCOM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道.NET有WCF,我相信被吹捧为取代COM当它是codenamed靛蓝(?) - 但它实际上适用于.NET应用程序的使用,提供相同的功能一个C ++ / DCOM应用程序?

I know .net has WCF, which I believe was touted as the replacement for COM when it was codenamed Indigo(?) - but is it actually suitable for use in a .NET app, providing the same functionality as a C++/DCOM application?

一个DCOM应用程序的客户机 - 服务器系统可以是一个痛苦,但我认为相比其他选项,如网络服务,这是非常有效的 - 这有其他的问题,反正

A DCOM app on a client-server system can be a pain, but I think it's quite efficient compared to other options like web-services - which have other issues anyway.

因此​​,WCF是一个真正的继任者(D)COM还是有不同的目的是什么?

So, is WCF a true successor to (D)COM or does it have different aims?

编辑:我说的是具体有关分布式应用程序和远程控制 - 例如,一个服务器可能会导致一个对话框发动工作站,工作站可以调用服务器上的方法来发送响应等我加的是D我的标题相应。

I'm talking specifically about distributed apps and remote controlling - e.g a server can cause a dialog to launch on a workstation, workstations can call methods on the server to send it responses, etc. I added the 'D' to my title accordingly.

推荐答案

我不知道有任何官方指导名称继任为DCOM,但是.NET具有可替代DCOM的使用两个框架。他们是WCF和.NET Remoting的。

I'm not aware of any official guidance that names a successor for DCOM, but .NET has two frameworks that can replace usage of DCOM. They are WCF and .NET Remoting.

的WCF可以用作替代所有的通过DCOM和更提供的传输特性。如果你是在一个情况下,你不能使用.NET 3.0或更新版本;你只需要提供,而不是.NET远程。在.NET两个框架让你发出电话和其他线程,进程和计算机传送执行控制主机。远程很可能意在替换为DCOM,它可以处理几乎所有的传输功能为好,但收养并没有如此之大。

WCF can be used as a replacement for all of the transport features provided by DCOM and more. If you are in a situation where you can't use .NET 3.0 or newer versions; you only have .NET remoting available instead. Both frameworks within .NET allow you to issue calls and transfer control of execution to hosts in other threads, processes, and computers. Remoting was likely intended to be the replacement for DCOM, and it can handle nearly all of the transport features as well, but adoption has not been that great.

在一般情况下,大多数人preFER WCF,因为现在一切都明确界定,并有大量的特性来控制取得了WCF调用的方面。普通.NET远程有点废用时下,因为你将需要管理上的无线不能相比,DCOM在负担显著改善两岸类型的信息。此外,它不具有共享存储器传输,所以帧内线程/进程通信是一种使用基于套接字通信并受到环回插座的性能限制仅设置

In general, most people prefer WCF now because everything is well defined and there are tons of features to control the aspects of calls made over WCF. Regular .NET remoting is somewhat in disuse nowadays because you will need to manage type information on both sides of the wire- not a significant improvement in burden compared to DCOM. Also, it does not have a shared-memory transport, so intra-thread/process communication is only setup using socket-based communication and subject to limitations of loopback socket performance.

至于你提到的一般情况下,pretty的多的应用程序可用于连接通过WCF和远程处理其他应用程序访问。最棘手的问题涉及在Web应用程序托管组件通信。在一般情况下,这通常是不done-呼叫从他们发出但很少接受HTTP / HTTPS Web活动的外面。安全和身份管理可能会非常棘手过,但在DCOM配置为基础的设置大为改善。

Regarding the general scenarios you mention, pretty much any application can be made accessible for connectivity to other applications via WCF or Remoting. Most of the tricky issues involve communication with hosted components in web applications. In general, this usually isn't done- calls are issued from them but rarely accepted outside of http/https web activity. Security and identity management can be tricky too, but is much improved over DCOM's configuration-based setup.

总体而言,无论是WCF和.NET Remoting的比DCOM显著好。他们是容易安装和维护,并没有将使用DCOM下相同的注册头痛的COM组件。此外,你得到的天然库异常故障条件.NET内在的利益;而在DCOM,你将不必担心适当地处理传送失败和超时应用程序中的code。仅这一点就应该显著减少$ C $的量c,你必须写来处理这样的条件,并与异步调用也可以背出来了长时间操作时,你的愿望。这是相当棘手的DCOM中做的很好。

Overall, both WCF and .NET Remoting are significantly better than DCOM. They're easier to setup and maintain, and don't have the same registration headaches as COM components would for use under DCOM. Furthermore, you get intrinsic benefits like natural library exceptions for failure conditions in .NET; whereas in DCOM you would have to worry about gracefully handling failed delivery and timeouts in your application code. This alone should significantly reduce the amount of code you have to write to handle such conditions, and with asynchronous calls you can also back out of a long operation whenever you wish. This is quite tricky to do well in DCOM.

这篇关于是否有一个可行的对手在.NET中DCOM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 17:39