Turn: test the access speed of three remoting channels: HTTP, TCP, IPC, and Web Service

Source: Internet
Author: User

From: http://www.cnblogs.com/zhang3533/archive/2007/06/26/795705.html

 

Test the access speed of three remoting channels: HTTP, TCP, IPC, and Web Service

Remoting and Web Service are. net can be used for Distributed System Development. If it is a different platform, you can only select Web service, but if it is the same platform, you can choose. In the end, there are also access efficiency considerations. At the same time, there are three channels in remoting, namely HTTP, TCP, and IPC, which have different differences. The HTTP channel has an advantage over the firewall. The TCP channel is usually used for LAN communication, which is much faster than http. The IPC channel is used for inter-process communication between the same machine, communication does not occupy network resources, and the speed is much faster than TCP. I wrote a smallProgramTest. The implementation of this program is very simple to use three remoting channels and Web Service to access the same object (equivalent to the business layer in the actual project), and this object returns the system time. That's simple. If you do not know much about remoting and Web Service, you can also familiarize yourself with the differences in the three remoting channels and web service calls in this example.
The following is the program running interface. net minimum time measurement: The scale (it is difficult to measure the difference between them in milliseconds on the local machine) to test the time of each call, and compare the access speed with the average time measured by multiple calls. Through the test, we can see the access speed of the four of them: IPC> TCP> HTTP> Web service. (In fact, the access speed of remoting's HTTP channel and Web Service remains to be compared, and there is a relationship with the tested host, on a computer in my office, it seems that web service access speed is faster than http channel). You can test it yourself or study a better method.

 

Code

/Files/zhang3533/remotingandwebservice.rar

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.