Web 服务和远程处理有什么区别?

发布于 2024-08-05 14:50:08 字数 140 浏览 5 评论 0原文

我了解 Web 服务并对远程处理有一些了解。 这两个概念都调用客户端计算机上的方法,那么区别在哪里?

通过远程处理,我们还可以在远程计算机上执行该方法,并且也可以通过 Web 服务实现相同的功能。

如果这是一个显而易见的问题,请原谅。

I know web service and have some knowledge on remoting.
Both concepts invoke methods on the client machine so where lies the difference ??

Through remoting we can also execute the method on the remote machine and the same functionality can be achieved through web service too..

Please excuse me if it is the obvious question..

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

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

发布评论

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

评论(7

嘿咻 2024-08-12 14:50:08

两者都支持分布式应用程序。

Web 服务是跨平台的,使用通用标准并通过防火墙工作。他们还根据消息而不是对象来思考 - 您向服务发送消息,然后得到回复。

远程处理是一种仅适用于 MS 的技术,它不跨平台并以二进制格式进行通信。它以对象的方式思考,您在远程服务器上创建一个对象并使用它。它不能很好地与防火墙配合使用。如今,远程处理也已消亡,MS 青睐 WCF(包括 Web 服务)

Both support distributed applications.

Web services are cross platform, using common standards and work through firewalls. They also think in terms of messages, not objects - you send a message to a service, and you get a reply.

Remoting is an MS only technology which is not cross platform and talks in a binary format. It thinks in terms of objects, you create an object on the remote server and work with it. It doesn't work well with firewalls. Remoting is also dead these days, MS favour WCF (which includes web services)

妳是的陽光 2024-08-12 14:50:08

.NET Remoting 概念 是 Microsoft/.NET 特定的进程间通信技术。

“Web 服务”一词由于其炒作而非常广泛。但我认为 W3C 定义适用于大多数情况。它定义了使用 WSDL 作为接口描述和 SOAP 作为消息协议。

根据 MSDN 上的 Microsoft .NET Remoting:技术概述,Remoting使用二进制或 XML 编码。而 XML 编码使用 SOAP。但据我所知,它不符合 WS-I Basic Profile 。因此,它提供的 Web 服务互操作性极其有限。

这两个概念都允许进程间通信。如果您的应用程序仅使用 .NET,那么使用 .NET Remoting 是一个不错的选择。

但是,如果您计划提供与其他编程语言的互操作性,那么您应该使用 Web 服务。

.NET Remoting concept is a Microsoft/.NET specific interprocess communication technology.

The term "Web service" is very diffuse due to its hype. But I think the W3C definition is intended in most cases. It defines the use of WSDL as interface description and SOAP as message protocol.

According to Microsoft .NET Remoting: A Technical Overview on MSDN, Remoting uses either a binary or XML encoding. Whereas the XML encoding uses SOAP. But as far as I know, it does not adhere to the WS-I Basic Profile. Hence, it provides an extremely limited Web service interoperability.

Both concepts allow interprocess communication. If your application only uses .NET, then using .NET Remoting is a good choice.

However, if you plan to provide interoperability with other programming languages than you should use Web services.

猫腻 2024-08-12 14:50:08

基于 ASP.NET 的 Web 服务只能通过 HTTP 访问。 .NET Remoting 可以跨任何协议使用。

Web 服务在无状态环境中工作,其中每个请求都会创建一个新对象来为该请求提供服务。 .NET Remoting 支持状态管理选项,可以关联来自同一客户端的多个调用并支持回调。

Web 服务通过 SOAP 消息中包含的 XML 来序列化对象,因此只能处理可以完全用 XML 表达的项目。 .NET Remoting 依赖于包含有关数据类型信息的公共语言运行时程序集的存在。这限制了必须传递的有关对象的信息,并允许通过值或引用传递对象。

Web 服务支持跨平台的互操作性,并且有利于异构环境。 .NET Remoting 要求使用 .NET 或其他支持 .NET Remoting 的框架构建客户端,这意味着同构环境。

ASP.NET based Web services can only be accessed over HTTP. .NET Remoting can be used across any protocol.

Web services work in a stateless environment where each request results in a new object created to service the request. .NET Remoting supports state management options and can correlate multiple calls from the same client and support callbacks.

Web services serialize objects through XML contained in the SOAP messages and can thus only handle items that can be fully expressed in XML. .NET Remoting relies on the existence of the common language runtime assemblies that contain information about data types. This limits the information that must be passed about an object and allows objects to be passed by value or by reference.

Web services support interoperability across platforms and are good for heterogeneous environments. .NET Remoting requires the clients be built using .NET, or another framework that supports .NET Remoting, which means a homogeneous environment.

森林迷了鹿 2024-08-12 14:50:08

远程处理和 Web 服务都是应用程序之间通信的方式。

远程处理 - 在远程处理中,通信过程中涉及的应用程序可能位于同一台计算机上,也可能位于同一或不同网络中的不同计算机上。在远程处理中,两个应用程序彼此了解。在另一个应用程序上创建应用程序对象的代理。

Web 服务 - 使用 Web 服务的应用程序之间的通信是独立于平台和编程的。使用 Web 服务的应用程序只需访问它,而不需要知道该 Web 服务实际上是如何实现和实现的。创建的。

Both Remoting and Web Services are ways of communication between applications.

Remoting - In remoting, the applications involved in the communication process may be located on the same computer, different computers in a same or different network. In remoting, both applications know about each other. A proxy of an application object is created on the other application.

Web Services - Communication between applications using web services is platform independent and programming independent. The application that consumes the web service, simply accesses it, without needing to know how this web service has actually been implemented & created.

柳若烟 2024-08-12 14:50:08

Web 服务是远程处理的一种形式,因为您可以在 AppDomain 之外的其他位置或同一台计算机上有效地执行代码。

在同一台计算机上或通过网络进行远程处理(进程间)是不同的,因为您通过透明代理和序列化在 AppDomain/平台边界之间编组对象。远程处理具有其复杂性,并且很容易变得非常复杂。 WCF 使维护变得更加简单。在性能方面,我还没有比较这两种方法,并且肯定有兴趣了解这两种方法在进程间上下文中的表现。由于WCF可以与二进制绑定进行通信并且不限于HTTP协议。

WCF 使用 Pipes 进行进程间通信,使这一过程变得更加简单。

最后,用于通过端口 80(标准)HTTP 进行通信的 Web 服务和远程处理可以使用不同的序列化格式化程序通过预定义的端口和通道进行通信。

它们现已由 WCF 升级,WCF 现在提供了用于这些类型通信的方法。

WebServices are a form of remoting, since you are effectively executing code else where or on the same machine outside of you AppDomain.

Remoting (InterProcess) on the same machine or over the network, is different in the sence that you Marshal your object between AppDomain/ platform boundries through transparent proxies and serialization. Remoting comes with its complexities and can easily become very complexe. WCF has made things much simpler to maintain. Performance wise, I haven't compared both approaches and would definitely be interested to see how both fare in an InterProcess context. Since WCF can communicate with binary bindings and is not limited to the HTTP Protocol.

WCF has made this much simpler using Pipes for InterProcess communication.

In the end WebServices used to communicate via port 80 (standard) HTTP and Remoting could communicate via predefined ports and channels using different serialization formatters.

They have now been upgraded by WCF which now provides methods for these types of communications.

聽兲甴掵 2024-08-12 14:50:08

远程处理是模拟作为本地方法调用的外部方法,接受相同类型的参数,因此它需要的只是序列化对象并调用远程方法(使用相同的语言或平台),并提供响应。

Web 服务(SOAP 服务)处理 RPC 术语中的跨平台方法调用,但可以使用文档样式服务进一步改进,这里语言或平台不是障碍,因为 XML 将通过编组和解编本机和 XML 表示充当中间人。

Remoting is simulating the foreign method invoked as local method, accepting same type of parameters hence all it needs is to serilazie the object and transfer invoke the remote method (which is in same language or platform), and provide the respone.

Web Service (SOAP service) deals with cross platform method invocations in RPC terms but is further can be improved using Document style services, here the languages or platforms are not the barriers as XML will acts as intermediate by marshalling and unmarshilling the native and XML representations.

北斗星光 2024-08-12 14:50:08

WebService 是通过 HTTP 实现的,而 Remoting 是通过 TCP/UDP 实现的。
因此,远程处理在速度方面表现更好。

While WebService is implemented over HTTP, Remoting is implemented over TCP/UDP.
Thus Remoting performs better in terms of speed.

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