Summary
Performance has been a sore spot of XML-based Web services. In a recent Sun Developer Network article, Bharath Mundlapudi measures the performance of JAX-RPC 1.1 and Java-WS 2.0, showing how performance-related investment have paid off in the latest Java Web service stack.
Advertisement
A frequent criticism of XML-based Web services is that they tend to perform poorly under heavy load. While performance was a sore spot of early Web service implementations, performance-related investments in more recent Web service tools seem to have paid off, according Bharath Mundlapudi in a recent Sun Developer Network article, Implementing High-Performance Web Services Using JAX-WS 2.0. Although XML processing is still a dominant aspect of Web services performance, Mundlapudi shows that Web service performance is a result of the interaction of several components:
You can measure the performance of the web services stack in two ways, depending on your deployment model: end-to-end performance and endpoint performance... If a web service deployment involves [both] the client and server stack[s], then measurements in the performance tests should include both of these components [in end-to-end testing]... [In endpoint performance testing,] the only concern is the endpoint, that is, the server-side performance.
Mundlapudi offers a few guidelines to obtain the best performance from a Java Web service:
Choose the primitives depending on the requirements —such as the number of digits, precision, and so on—because primitives can affect the performance based on their usage.
An increase in payload size will reduce the throughput and have considerable effect on performance.
JAXB binding or schema binding provides better performance than does DOM or nonschema binding.
JAX-WS 2.0 gives better binding performance than does JAX-RPC 1.1.
For large payload sizes, the performance of JAX-WS 2.0 is about twice that of JAX-RPC 1.1.
A key point in Mundlapudi's article is that Web service performance depends only in part on SOAP performance, and that, in fact, a large part of Web service performance relates to binding Java data types to XML and vice versa. Even without using SOAP, a REST or HTTP-based Web service that uses data binding will have to incur that overhead.
What's your experience with the performance of Java-based Web services, SOAP-based or otherwise?