RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Boost Web Service Performance in JAX-WS with Fast Infoset : Page 3

Web service performance depends largely on the size of the XML data being transmitted and the speed of XML processing. Fast Infoset helps greatly with those aspects.

Web Service Performance: Fast Infoset vs. MTOM/XOP
MTOM (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):

  1. A standard JAX-WS web service (Standard)
  2. Both client and service MTOM-enabled (MTOM/XOP)
  3. 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.

Click to enlarge

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.

Click to enlarge

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 services—especially those that process and transport binary data—clearly 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.) Developers—particularly those in the SOA domain—should explore this promising technology and learn how they can work more efficiently with XML to deliver high-performing web services.

Young Yang, who holds a Ph.D. in mathematics, is a senior enterprise architect at a Wall Street financial company. He is certified by IBM in e-business design, DB2 administration, business intelligence, XML and related technologies, and WebSphere Application Server; by Bea on WebLogic Application Server; and by Sun as an enterprise architect among others.
Email AuthorEmail Author
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date