Brief introduction of Webs brief introduction to the difference between webservice and. NET Remoting and its adaptation occasions

Source: Internet
Author: User
Tags wsdl

To be able to clearly describe the difference between Web Service and remoting, I'm going to start with their architecture:
A WEB service is broadly divided into 5 levels:
1. HTTP Transport Channel
2. Data format FOR XML
3. SOAP Encapsulation Format
4. How WSDL is described
5. UDDI

Generally speaking, the WEB service structure under. Net is relatively simple and easy to understand and apply:
Generally speaking in. NET architecture, WebService applications are based on the. NET Framework and the IIS architecture, so deploying (Dispose) is relatively easy.
From the perspective of implementation,

First webservice must inherit from the class of the method exposed to the client: System.Web.Services.WebService this base class
The next exposed method must be preceded by [WebMethod] or [WebMethodAttribute]

Operation Mechanism of WebService
First the client from the server to the WebService WSDL, while the client claims a proxy class
This proxy class is responsible for request and response with the WebService server
When a data (XML format) is encapsulated in a SOAP-formatted stream to the server, a process object is generated and the SOAP packet that receives the request is parsed, then the thing is processed, and the result is soap-wrapped after processing ends. And then the package as a response sent to the client proxy class, similarly, the proxy class will also parse the SOAP packet, followed by subsequent operations.

This is a running process for webservice.

Here's a summary of the. Net Remoting:
. Net Remoting is a technology developed on the basis of DCOM, its main purpose is to achieve cross-platform, cross-language, penetrate the enterprise firewall, which is also his basic features, and WebService is different, it supports HTTP and TCP channels, And it can transfer not only the XML-formatted SOAP packet, but also the traditional binary stream, which makes it more efficient and more flexible. And it does not depend on IIS, users can develop (development) themselves and deploy (Dispose) their favorite host server, so in terms of these aspects webservice is actually a special case of. Net Remoting.

Comparison
Once again we make a comparison of WebService and remoting
WebService is characterized by platform independence (platform-independent), cross-language (as long as XML-capable languages are available) and penetrating the corporate firewall;. Net WebService is stateless based on HTTP;
But its drawbacks are also obvious, that is, the need to deploy a Web Server, and slower;

The. Net Remoting feature is
His advantage is that the user can either use the TCP channel to communicate in the binary stream mode, or use the HTTP channel for the SOAP format of sexual communication
The efficiency is relatively webservice to be much higher;
Remoting can be used in stateful situations;
But its drawbacks are also obvious,. NET remoting can only be applied under the MS. NET Framework.

Use occasions
If both sides of the interaction are supported. NET technology environment, and can provide a consistent authentication mechanism on the operating system, and attaches great importance to the efficiency of communication between the two sides, that is, the time of the. Net Remoting. On the contrary, if the communication between the two sides is heterogeneous environment, or the mode of communication is stateless situation, the ongoing interactive work is not relevant before and after, Web service is the ideal choice.

Above article reproduced from the internet
more details

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.