Compressing Server Responses in Java Enterprise Applications
Testing Compression of Web Services with soapUI
For testing purposes, compression filters were used to compress web service responses. This included XML in the SOAP envelope. The royalty-free, web service analysis and testing tool soapUI was used to test compressed web services (see Figure 2).Among its many features, soapUI lets you receive compressed messages and automatically decompress them. Optionally, you may disable decompression, which is useful if you need to measure pure network transfer time without any processing on the client (see Figure 3).
The test results from soapUI indicate that compression is comparable with both toolkits. In other words, the compressed output to uncompressed input has exactly the same ratio in both approaches. This is likely due to the fact that the algorithm is the same. Interestingly, the PlanetJ compression filter seems to compress faster than the WebLogic filter, which caused more request/response processing per specific amount of time. The table below shows the results of a sample 10-minute run.
Applying Compression Implementations
The advent of modern APIs for client/server communication leads to faster development times and more robust applications on one hand, but it can also lead to excessive messages transmitted over the wire on the other hand. This in turn requires you to apply other technologies, such as the compression implementations described in this article.
Code Download
For Further Reading
About the Author
Vlad Kofman works on enterprise-scale projects for major Wall Street firms. He has also worked on defense contracts for the U.S. government. His main interests are web-related programming methodologies, UI patterns, and SOA.Page 3 of 3
This article was originally published on August 5, 2009