REST – Updating a resource has multiple side effects

I have seen REST or ROA described as Distributed Objects Realized and believe me I get it. However, different operations on objects have different side-effects and from an implementation perspective I struggle with why REST is necessarily better in ALL situations.

Let me give an example. Imagine a resource X that can be updated (PUT’d) in various ways and traverse multiple states, the representation (or payload) sent to my implementation will need to contain information on what “update”I want to do. In essence, my intent is not solely conveyed in the fact that I am using PUT – the consumer of my service needs to know the appropriate payload before they can effectively use my service. (Could it be that my resource design is wrong?) Knowing how to “PUT” to some resource doesn’t help them that much. I think this is a fact that is severely understated!

This is why I think the design of the messages passed between consumer and service is also quite important.

Somewhat related to this point is the fact that “SOAP bashers” conflate SOAP with RPC. I would counter and say you can do SOAP without RPC, in fact I do it all the time using the WSE toolkit and SSDL. My consumers just send a message to an endpoint using their protocol of choice and that’s the end of the story. Most interactions (at this point) are complex operations (PUTs?) and so I personally don’t seem to gain much from a standard interface.

Is the SOAP payload overkill in some (ok many) instances, yes! But I would suggest that has little to do with RPC in itself. Have Microsoft, Sun, IBM, industry trainers etc. educated people incorrectly when it comes to SOAP-based web service design? Probably.

Having said all that, I believe RESTful solutions have their place in my toolkit. The nature of the client and the service that I need to provide ultimately drives how I build my service. Distilling requirements to the point where I know what tool to use is the hard part. 🙂

Now I could be missing the point completely here so if I am, feel free to comment and point out my error in thinking.


One Reply to “REST – Updating a resource has multiple side effects”

  1. You’ve probably got a string of hits a mile long from me coming and going from your blog all day long. Sorry about that but before I say something I want to try it out first. 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s