Webservice and. net remoting: webserviceremoting

Source: Internet
Author: User

Webservice and. net remoting: webserviceremoting

The server sends a process number and a program domain number to the client to determine the object location.

Both webservice and. net remoting are communication frameworks. Their biggest advantage is that they can call remote objects like local objects, for example:
Uploader uploader = new Uploader();
uploader.Save(file);
You can use this simple and abstract call to implement upload. You do not have to perform a series of processing operations on the socket, so you can focus more on the business logic;
Differences:
1. webservice is encapsulated by the application layer protocol http, so it can be called by many other languages. Many languages also implement webservice proxy encapsulation and tools, as long as you know the address of webservice (such as: http://www.baidu.com/SomeService.asmx), you can use, so the point of webservice is particularly useful, general, efficiency in general;
. Net remoting is encapsulated by the transport layer protocol tcp. Therefore, data can be transmitted in binary format with high efficiency ;. net remoting is based on. net reflection mechanism, only convenient. net (reflection mechanisms in other languages are implemented differently, and some do not reflect at all );
 
2. webservice can pass through the firewall because the http protocol is now widely used, and the firewall is generally not blocked. It does not mean that webservice has a function that goes through the firewall;
 
3. Can it be used only in winform?
If you are using.. net development, any type of applications can use webservice and. net remoting, including winform, asp.net, wpf, silverlight ..., as long as it can be using... you can use them as needed.

1) What is the working principle of. net Remoting?

A: the server sends a process number and a program domain number to the client to determine the object location.

 

2) What is the difference between the XML Web Service using ASMX and the. NET Remoting service using SOAP?

The message mechanism used by the Web Service, while the RPC. Web Service used by Remoting can be used on different platforms and languages. Remoting is only applicable to. Net. Remoting is more efficient than Xml Web Service.

 

3) briefly discuss your understanding of the remoting and webservice technologies under the Microsoft. NET architecture and their practical applications.

A: WS uses HTTP to penetrate the firewall. Remoting can improve the efficiency by using TCP/IP and binary transmission.

 

4). Overview of remoting and webservice in. NET and its practical application.

Remote logical call. The remoing interface can only be used in. net.

 

Remoting is. net is used to call methods across machine, process, and appdomain. For a three-structure program, remoting technology can be used to construct the program. it is the basic technology for distributed applications. equivalent to the previous DCOM

Web Service is a common model for building applications and can be implemented on all operating systems that support internet communication. Web Service enables the combination of component-based development and web to achieve the best, component-based object model.

 

Reference http://jiyong219.blog.163.com/blog/static/2694007120117384019766/


What is the difference between WebService and Remoting In the AspNet framework?

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.

The following is a summary of. 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.

Again, we will make a comparison between WebService and Remoting.
WebService features Platform-independent, cross-language (any language that supports XML), and enterprise firewall penetration.
However, its disadvantage is that a Web Server needs to be deployed, and the speed is relatively slow;

. Net Remoting features
The advantage is that users can use both TCP-based binary stream communication and HTTP-based SOAP-based communication.
The efficiency is much higher than that of WebService, but its disadvantages are also obvious.. net remoting can only be applied under the. net framework of MS.
In terms of performance, the efficiency of Remoting is very similar to that of traditional DCOM and COM +!

A brief introduction to your understanding of the remoting and webservice technologies under the microsoftnet architecture and their practical applications

WS primarily uses HTTP to penetrate the firewall. Remoting can improve the efficiency by using TCP/IP and binary transmission.

Related Article

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.