Monday, February 06, 2006

SOAP Protocol

Back in 2004, for my end of year university project, I decided to find ways to optimize the SOAP protocol, used for the invocation of web services, and to build an implementation of this protocol with the selected optimizations. During my literature survey I found a lot of research papers focusing on different performance problems of the protocol and proposing solutions.

Using a mix of these different solutions, I built my implementation of a SOAP RPC client and server which I’m posting here:

Binary, source & docs: http://www.vikash-madhow.com/files/soap/SOAP_RPC_0.8_ALL.zip

This server was tested against Apache Axis and had lower response times on almost all tests. The performance results are included in the full documentation found in the /doc folder.

For the sake of simplifying the server to a level that it can easily be grasped and re-used – if needed - by most, I’ve removed anything that I considered not part of the gist of the implementation. This included all the axis performance and interoperability tests, a simple SOAP client and server over the TCP protocol transport used during early tests and an implementation of the SOAP RPC server using the open-source jetty web server. If you want the original implementation, please email and I’ll send it to you.

The implementation contains the following optimizations amongst others:

  1. Uses an XML pull-parser for parsing SOAP messages (instead of a DOM or SAX parser).
  2. SOAP messages are encoded in the literal format instead of the SOAP encoding format.
  3. Uses the HTTP chunked transfer encoding for the transmission of SOAP messages which transmits messages in packets known as chunks.
  4. Compression of SOAP messages.
  5. Uses HTTP persistent connections and request pipelining.
Another interesting feature of this implementation is the HTTP layer which has been built as a set of I/O stream filters. Working thus with the HTTP layer is no more complicated than reading and writing files from the filesystem. The layer is also symmetric in the sense that using it on the server side is almost exactly the same as using it on the client side. To make things even simpler, there is a Connection abstraction that hides every details of the underlying network protocol.

Enjoy and let me know about any problems that you may encounter. If you reuse part or whole
I only ask for proper acknowledgement of source.

PS: The documentation is in the OpenDocument format and you can download OpenOffice 2 to read it from here: http://www.openoffice.org/

0 Comments:

Post a Comment

<< Home