简体   繁体   English

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

[英]What is the difference between web service and remoting?

I know web service and have some knowledge on remoting. 我知道Web服务并且对远程处理有一些了解。 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.. 通过远程处理我们也可以在远程机器上执行该方法,同样的功能也可以通过Web服务实现。

Please excuse me if it is the obvious question.. 如果这是一个明显的问题,请原谅我..

Both support distributed applications. 两者都支持分布式应用

Web services are cross platform, using common standards and work through firewalls. Web服务是跨平台的,使用通用标准并通过防火墙工作。 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. 远程处理是一种仅限MS的技术,它不是跨平台的,并且以二进制格式进行通信。 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) Remoting现在也已经死了,MS赞成WCF(包括Web服务)

.NET Remoting concept is a Microsoft/.NET specific interprocess communication technology. .NET Remoting概念是一种Microsoft / .NET特定的进程间通信技术。

The term "Web service" is very diffuse due to its hype. 由于其炒作,“Web服务”一词非常分散。 But I think the W3C definition is intended in most cases. 但我认为W3C定义适用于大多数情况。 It defines the use of WSDL as interface description and SOAP as message protocol. 它定义了WSDL作为接口描述和SOAP作为消息协议的使用。

According to Microsoft .NET Remoting: A Technical Overview on MSDN , Remoting uses either a binary or XML encoding. 根据Microsoft .NET Remoting:MSDN上的技术概述 ,Remoting使用二进制或XML编码。 Whereas the XML encoding uses SOAP. 而XML编码使用SOAP。 But as far as I know, it does not adhere to the WS-I Basic Profile . 但据我所知,它不符合WS-I Basic Profile Hence, it provides an extremely limited Web service interoperability. 因此,它提供了极其有限的Web服务互操作性。

Both concepts allow interprocess communication. 这两个概念都允许进程间通信。 If your application only uses .NET, then using .NET Remoting is a good choice. 如果您的应用程序仅使用.NET,那么使用.NET Remoting是一个不错的选择。

However, if you plan to provide interoperability with other programming languages than you should use Web services. 但是,如果您计划提供与其他编程语言的互操作性,那么您应该使用Web服务。

ASP.NET based Web services can only be accessed over HTTP. 基于ASP.NET的Web服务只能通过HTTP访问。 .NET Remoting can be used across any protocol. .NET Remoting可以在任何协议中使用。

Web services work in a stateless environment where each request results in a new object created to service the request. Web服务在无状态环境中工作,其中每个请求都会创建一个新对象来为请求提供服务。 .NET Remoting supports state management options and can correlate multiple calls from the same client and support callbacks. .NET Remoting支持状态管理选项,可以关联来自同一客户端的多个调用并支持回调。

Web services serialize objects through XML contained in the SOAP messages and can thus only handle items that can be fully expressed in XML. Web服务通过SOAP消息中包含的XML序列化对象,因此只能处理可以用XML完全表示的项目。 .NET Remoting relies on the existence of the common language runtime assemblies that contain information about data types. .NET Remoting依赖于包含有关数据类型信息的公共语言运行库程序集的存在。 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. Web服务支持跨平台的互操作性,适用于异构环境。 .NET Remoting requires the clients be built using .NET, or another framework that supports .NET Remoting, which means a homogeneous environment. .NET Remoting要求客户端使用.NET或其他支持.NET Remoting的框架构建,这意味着同构环境。

Both Remoting and Web Services are ways of communication between applications. 远程处理和Web服务都是应用程序之间的通信方式。

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. Web服务 - 使用Web服务的应用程序之间的通信独立于平台并且独立于编程。 The application that consumes the web service, simply accesses it, without needing to know how this web service has actually been implemented & created. 使用Web服务的应用程序只需访问它,而无需知道如何实际实现和创建此Web服务。

WebServices are a form of remoting, since you are effectively executing code else where or on the same machine outside of you AppDomain. Web服务是远程处理的一种形式,因为您有效地在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. 通过透明代理和序列化在AppDomain /平台边界之间制作对象,因此在同一台机器上或通过网络进行远程处理(InterProcess)是不同的。 Remoting comes with its complexities and can easily become very complexe. 远程处理具有复杂性,很容易变得非常复杂。 WCF has made things much simpler to maintain. WCF使维护更简单。 Performance wise, I haven't compared both approaches and would definitely be interested to see how both fare in an InterProcess context. 性能方面,我没有比较两种方法,并且肯定会有兴趣看看在InterProcess环境中的两种情况。 Since WCF can communicate with binary bindings and is not limited to the HTTP Protocol. 由于WCF可以与二进制绑定进行通信,因此不限于HTTP协议。

WCF has made this much simpler using Pipes for InterProcess communication. 使用Pipes进行InterProcess通信,WCF使这变得更加简单。

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. 最后,WebServices用于通过端口80(标准)进行通信,HTTP和Remoting可以使用不同的序列化格式化器通过预定义的端口和通道进行通信。

They have now been upgraded by WCF which now provides methods for these types of communications. 它们现在已由WCF升级,现在为这些类型的通信提供方法。

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

While WebService is implemented over HTTP, Remoting is implemented over TCP/UDP. 虽然WebService是通过HTTP实现的,但Remoting是通过TCP / UDP实现的。 Thus Remoting performs better in terms of speed. 因此,Remoting在速度方面表现更好。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 .Net Remoting和用于XML编码和Http通信的Web服务之间的区别 - Difference between .Net Remoting and Web Service for XML encoding and Http Communication WebService和Remoting之间的区别 - Difference between WebService and Remoting Rest Web Service和启用了rest的wcf服务之间有什么区别? - What is the difference between Rest Web Service & rest enabled wcf service? 是什么导致Web服务URL和名称空间之间的差异? - What causes a difference between a web service URL and a namespace? 在另一个线程中进行异步Web服务调用与进行同步Web服务调用之间有什么区别? - What is the difference between making an Async web service call and making a Synchronous web service call in another thread? “服务”和“组件”有什么区别? - What is the difference between "service" and "component"? Visual Studio选项有什么区别:ASP.NET Web服务和WCF服务 - What is the difference between the Visual Studio Options: ASP.NET Web Service and WCF Service DDD服务和WCF服务之间有什么区别? - What is the difference between a DDD service and a WCF service? 在.NET远程处理RemotingConfiguration.RegisterWellKnownServiceType和RemotingServices.Marshal之间有什么区别? - In .NET remoting what is the difference between RemotingConfiguration.RegisterWellKnownServiceType and RemotingServices.Marshal? Web应用程序和网站之间有什么区别? - What is the difference between web application and web site?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM