Simple Echo Test Setup
Server System — This is a Netweaver 2004 system running on AIX. It has a Function module on it that is Remote enabled that takes in one string as input concatenates some information onto it and sends it out as an output parameter. Caller System This is a Netweaver 2004s system running also on AIX. It has a program on it that calls the RFC 50 times in a row recording their run times. The collection mechanism for the timing is the get run time field function which according to the documentation should be accurate to the microsecond. The times below are converted into seconds to make it easier to compare. Web Service Proxy Setup Server System We created a web service on this system that points to the RFC we used in the Simple Echo Test. The virtual interface was created with both parameters in it, nothing was hidden or set to default. Caller System From the WSDL for the new WS on the Server System a generated a proxy class was created to allow us to call the WS on the Server System. Then a logic port was configured to point to the Server System, which is configured as an HTTP destination with SSO Tickets turned on. The program from the Simple Echo Test was modified to call the proxy right after the RFC so we get another 50 rows with a time for the RFC and the proxy call. The same mechanism was used to collect run times as in the prior test.
Table Type Test Setup
Server System Same as in all prior tests. A FM was created that takes in a number of rows as input and produces a table of that many rows with one column filled with the string foo. Caller System Just as before a program was created to call the RFC and the proxy back to back using the same time collection mechanism as before. Additionally, we vary the number of rows we get the RFC and Proxy to create.
Same System Test
The above two tests were then conducted on the using only one system, meaning Server System = Caller System. In this case the Server System described above was used for the same system testing. The proxy class points back to the system the service is defined on and the RFC destination was removed. Again all times are in seconds and collection mechanism remains constant.
Simple Echo Test
Table Type Test
Here is the raw data also just in case you want to see it.
The first and most obvious conclusion is that Web Services are much slower across the board, if you are calling a really simple function that has a simple interface or a more complex interface with tables, etc. I think everyone kind of knew this but, Im not sure anyone is talking about it. What gets to be more interesting then that is when you start to compare calling a proxy class on the same system you are on or calling it from another system, which allows you to isolate network time. The amount of data transmitting with a SOAP request and response is probably larger ( does anyone have data on this ) then the comparable RFC request and response but, this amount is negligible when compared to the parsing time of the XML. If we look at the averages of the Same System Table Test vs. the Different Systems Table Test we see that the averages are pretty much in line with sometimes the Different systems outpacing the same systems! So this means that the transmission of increasingly large XML documents doesnt have much impact on overall time. What does have impact is the parsing of those documents. This is one of those little discussed draw backs of Web Services, they take more time. If you are in a heterogeneous environment it will slow your application down considerably to use web services to do things. What other conclusions can be drawn from these data? Has anyone else compared these things for themselves? Is there a better way to do web services without all the SOAP, REST maybe? Subscribe to my blogs!