Differences between remoting and WebService

Source: Internet
Author: User
ArticleDirectory
    • Navigation of this series of articles
Navigation of this series of articles

Create an example and parse webmethod features

Analysis of WebService features and array types

Class and struct Parsing

Use Yahoo public API for weather forecast Web Service

WebService design and Pattern

Differences between remoting and WebService

There is no essential difference in its implementation principle, and there are the following differences in application development:
1. remoting can flexibly define the Protocol it is based on. If it is defined as HTTP, it is no different from web service. Generally, you like to define it as TCP, which is a little more efficient than web service.
2. remoting is not a standard, whereas Web Service is a standard;
3. remoting generally needs to be started through a winform or Windows service, while Web Service requires IIS to be started.
4. In the vs.net development environment, Web service calls are encapsulated, which is easier to use than remoting.

I suggest using Web Services, which is easier to control for development.
Remoting is generally used in C/S systems, while Web Service is used in B/S systems.
The latter is also a common interface for various languages
In the same way, they are all based on XML

  • To clearly describe the differences between Web Service and remoting, I plan to start with their architecture:
    Web services are divided into five levels:
    1. Http Transmission Channel
    2. XML data format
    3. Soap Encapsulation Format
    4. Description of WSDL
    5. UDDI

    In general, the Web service structure under. NET is relatively simple and easy to understand and apply:
    Generally, WebService applications in the. NET structure are based on the. NET Framework and IIS architecture, so it is relatively easy to deploy (dispose.
    From the implementation perspective,

    First, WebService must inherit the class of the method exposed to the client from the base class: system. Web. Services. WebService.
    Second, the exposed methods must be preceded by [webmethod] or [webmethodattribute].

    Running Mechanism of WebService
    First, the client uses the WSDL from the server to the WebService, and claims a proxy class on the client)
    This proxy class is responsible for request and response with the WebService Server
    When a data (in XML format) is encapsulated into a data stream in soap format and sent to the server, a process object is generated and the soap packet that receives the request is parsed, then, the transaction is processed. After the processing is completed, the computation result is packaged with soap, and then the package is used as a proxy class sent to the client as a response. Similarly, this proxy class also parses the soap package and then performs subsequent operations.

    This is a running process of WebService.

    faces. net remoting:
    . net remoting is a technology developed on the basis of DCOM. Its main purpose is to achieve cross-platform, cross-language, and penetration of Enterprise Firewall, which is also its basic feature, different from WebService, WebService supports HTTP and TCP channels. It can not only transmit soap packets in XML format, but also transmit binary streams in the traditional sense, this makes it more efficient and flexible. In addition, it does not depend on IIS. Users can develop and deploy their own host servers (dispose). Therefore, WebService is actually used in these aspects. net remoting is a special case.
    two remoting channels
    there are two main remoting channels: TCP and HTTP. In. net, the ichannel interface is defined in system. runtime. remoting. Channel. The ichannel interface includes the tcpchannel and HTTP channel types. They correspond to the two types of remoting channels respectively

    1. remoting is based on callback byreference. You can directly operate on the server object by passing a variable reference. Fast, suitable for Intranet (Intranet ).
    the value of an object must be passed because WebService is composed of bytes. Slow speed, can pass firewall, simple configuration, suitable for Internet (Internet ).

    • 2.In general, remoting is platform-related and requires both the client and server to be. net. However, the configurable features are better and the protocols can be customized. Web services can communicate across platforms, but must adopt the SOAP protocol. 

      3. sOap messages have two styles: RPC and document.The body element of the Document Style contains one or more elements, which can be any content, as long as the recipient understands it. The RPC-style body element contains the name of the called method or remote procedure, andThe element that represents the method parameter. 

      . Net implements the web service and remoting.

In summary, the difference between remoting and Web Services is:
(1) Support both TCP and HTTP channels, fast transmission speed
(2) XML soap packets can be transmitted and binary streams can be transmitted, with High Efficiency
(3) remoteing is mainly used for C/S structure projects.
(4) You do not have to rely on the IIS server

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.