When REST advantages weigh less…

There are two interesting posts by Stefan Tilkov WS-* Advantages and Stuart Charlton What are the benefits of WS-* or proprietary services? on when to use WS-* instead of REST.

Stu writes: “When you want a vendor independent MOM for stateful in-order, reliable, non-idempotent messages, and don’t have time or inclination to make your data easily reused… ”

We could reverse this argument: when do the advantages of REST (caching, linking and bookmarking to name some) matter less? For one of my customers I design part of the Dutch national healthcare exchange, which is used to exchange patient data between care providers. Nearly all messages involved include the patient id: therefore most messages are pretty unique, and tied to a particular care context: say a patient visits his GP, or collect medication from his apothecary. In such exchanges, caching doesn’t matter at all. It is possible some data (a patients medication history) is retrieved twice when the patient visits two doctors after another, but in general in such an infrastructure it’s better to simple turn off caching, GET the data twice in the outlier cases and not be bothered by the overhead involved in caching.

It seems to me a lot of business exchanges (say order/invoice such as UBL does) share this property of mostly unique messages, whereas cases such as Google or Amazon APIs clearly will benefit a lot from caching. The distinction is between messaging (sending letters) and publishing (newspapers).
I’m not advocating REST or WS-* here for any particular application, but thinking about where the benefits of REST matter most is another way of thinking choosing technologies. For publishing, REST with all the optimizations of GET is the option to look at first. For messaging it’s less obvious where to start.

This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to When REST advantages weigh less…

  1. Tom says:

    Yes, good point about the caching. But, REST is about much more than caching. To me it’s more about standardizing access to resources. “Convention over configuration.” Imagine if all healthcare databases implemented REST and followed a standard resource namespace. Developers could much more easily interface with non-proprietary databases, with less training and troubleshooting, resulting in numerous cost-reductions across the healthcare-IT industry. This would ultimately help to reduce costs for patients as well.

  2. @Tom:

    “REST is about much more than caching” Sure. As you mention, uniform resource access is a great good. It enables linking & bookmarking, i.e. storing and retrieving resource identifiers in a uniform way, and that’s a great benefit.

Comments are closed.