Sunday, July 16, 2006

SOAP verses REST at ApacheCon

I recently attended ApacheCon Europe which was in Dublin, so it was just down the road from us at Cape Clear. One of the sessions that I found particularly interesting was Slicing and dicing REST with Apache Cocoon. Cocoon is a framework for XML over HTTP with some really nice features. It was no surprise that the presentation started with a comparison of SOAP with REST. Of course, the technical differences have been well rehearsed at this stage, with both sides often declaring victory. There are many similarities between two, which has lead to much debate over which to use in different circumstances. However, it occurs to me that all the best examples of REST involve a human as the end user, either through a browser or a mobile device. That’s because “reliable enough” is perfectible acceptable once there’s a human in the loop, especially given the other advantages of REST. However, for application to application communication, guarantees of delivery and traceability are required. With REST you get the QOS provided by HTTP, SOAP builds on it to provide a higher QOS. If you’re ever tempted to put a retry loop into your REST client just in case the HTTP connection is refused, then you need to face up to the need for SOAP (with WS-RM of course). On the other hand, don’t go building a light weight SOAP stack for use in devices; it’s just too close to the end user.

0 comments: