June 04, 2004

Overcoming XML limitations for higher performance

Now that Web services are being considered for high performance applications- such as scientific computing- the limitiations of XML for messaging are being felt very acutely. No matter what you do for performance [3], once you try transferring huge amounts of, say biological data [5], your performance characteristics won't be pretty. Its not just the size of the message that is a concern, it is also the overhead of doing a object->XML->object conversion.

There are multiple solutions that have been proposed for this:

  1. Compress the XML payload [5]. However, compression isn't free, and so this approach has a tradeoff between processing and network overhead. Another problem is interoperability - though this can be overcome by specifying the compression protocol as a part of the payload.
  2. Use XML accelerators [1] that offload XML processing from Application servers to hardware. Sarvega and Data Power are two companies I know that offer these products.
  3. Use SOAP to negotiate a custom binary protocol, and then use that for data transfer [4].
  4. An interesting new approach is a Sun initiative called Fast Web services [2] or "Fast". This uses a binary encoding for the SOAP payload. The higher level protocols (WSDL for contract definition of service etc.) remain unchanged, so in theory you could use standard SOAP-XML for development, and have a switch that turns on the binary protocol for production deployment. The binary protocol is not Java-only, and is standards based- Packed Encoding Rules (PER), also known as X.691. This protocol is a part of the ASN.1 family, and has been around for a while. Work is underway to map XSD to ASN.1. Fast is also backward compatible with non-Fast peers - the approach is "Use Fast when available, and use XML otherwise".

This is an interesting area to watch- I personally like Fast approach. Sun was supposed to unveil a prototype version of Fast Web services in its Java Web Services Developer Pack (WSDP) early 2004, and I'm waiting for it.

References:

[1] Peter Lin. So You Want High Performance? http://jakarta.apache.org/tomcat/articles/performance.pdf

[2] Paul Sandoz, Santiago Pericas-Geertsen et al. Fast Web Services. http://java.sun.com/developer/technicalArticles/WebServices/fastWS/

[3] Vivek Chopra. Performance best practices for Web services. http://www.soaprpc.com/archives/000020.html

[4] Madhusudhan Govindaraju, Aleksander Slominski et al. Requirements for and Evaluation of RMI Protocols for Scientific Computing. http://www.sc2000.org/techpapr/papers/pap.pap261.pdf

[5] Chetna Warade, Virinder Batra et al. Web services for bioinformatics, Part 2- Integrate high-throughput services with Web services. http://www-106.ibm.com/developerworks/library/ws-bioinfo2.html?ca=drs-ws2304

Update [June 18, 2004]: More information of Fast Web services and Fast infoset can be found here.

Posted by vivek at June 4, 2004 12:52 AM | TrackBack
Comments
Post a comment









Remember personal info?