Performance


The two main reasons to use remoting instead of Web services are easier programming and better performance. We’ve seen the greater ease of programming throughout this chapter. Now let’s measure the performance so that we can try to say something intelligent about it. I wrote a remoting version of the chunkiness testing application that I used for Web services in Chapter 4. Table 10-2 shows the results on a fast machine and a fast network, with nothing much happening on either. All times are in milliseconds, with an average of 1000 calls.

I wrote a sample program for measuring performance of remoting.

Table 10-2: Results of the Chunkiness Application Testing

Bytes Transferred

Forms Host, TCP Channel

IIS Host, Binary Formatter, HTTP Channel

Forms Host, SOAP Formatter, HTTP Channel

Web Service

1

1

4

4

9

1 KB

1

4

5

9

10 KB

1

5

8

20

100 KB

6

10

43

151

1 MB

34

54

344

1445

In this simple test, remoting with a TCP channel was the fastest, with binary-formatted HTTP close behind. These, in turn, were faster than SOAP- formatted HTTP by a factor of 8 or 10, and faster than Web services (which use SOAP-formatted HTTP) by a factor of 10 to 50, the speed advantage increasing as greater amounts of data are transferred. So, if you have a large amount of data to transfer from one Microsoft box to another and you don’t care about working with non-Microsoft systems, remoting is the way to go.

Remoting is much faster than Web services.




Introducing Microsoft. NET
Introducing Microsoft .NET (Pro-Developer)
ISBN: 0735619182
EAN: 2147483647
Year: 2003
Pages: 110

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net