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