Web Service Performance: Fast Infoset vs. MTOM/XOP
(SOAP Message Transmission Optimization Mechanism) is a W3C Recommendation for packaging binary data within SOAP messages in a way that avoids base64 encoding. It depends on XOP
(XML-binary Optimized Packaging), which provides a mechanism for embedding binary data in XML infosets. XOP supports only the embedding of binary data for chunks of character information items. As you have learned, Fast Infoset describes a binary encoding of the XML Information Set and allows for the direct embedding of binary data (as either chunks of character information items or the property of attribute information items). In this sense, Fast Infoset does what MTOM/XOP can do plus a lot more.
JAX-WS 2.0 and its reference implementation support both Fast Infoset and MTOM/XOP (see my previous DevX article on MTOM/XOP and its support in JAX-WS 2.0). So which technology is better in terms of their impact on web service performance? Let's find out using the example application.
For each of the following settings, Figure 1 and Figure 2 present bar charts that summarize the average response time (ART) for three different sets of data (corresponding to the ISBNs provided in the example application):
- A standard JAX-WS web service (Standard)
- Both client and service MTOM-enabled (MTOM/XOP)
- Fast Infoset enabled (FI)
Figure 1 shows the results of invoking the upload method. The data size format (X + X) indicates the size of the cover image plus the size of the sample chapter. It marks one standard deviation on the bars.
|Figure 1. ART for upload() Method Invocations|
This figure shows the results of invoking the upload method.
Figure 2 is for the retrieve method (with the size of the sample chapter list). It also marks one standard deviation on the bars.
|Figure 2. ART for retrieve() Method Invocations|
This figure shows the retrieve method (with the size of the sample chapter list).
As the empirical data clearly demonstrates, web servicesespecially those that process and transport binary dataclearly benefit from both MTOM and Fast Infoset. However, the reference implementation of JAX-WS 2.0 Fast Infoset-enabled web services consistently perform better than MTOM-enabled ones.
Fast Infoset Rising
Fast Infoset is on its way to being widely supported in various platforms and frameworks such as Microsoft .NET and .NET CF, Sun GlassFish, BEA WebLogic, IBM SDK for Java 6.0, and TMax Soft JEUS 6, as well as in the Linux, Solaris, and Win32 operating systems. (Fast Infoset support in JAX-WS is based on the FI project at java.net.) Developersparticularly those in the SOA domainshould explore this promising technology and learn how they can work more efficiently with XML to deliver high-performing web services.