Mon, 27 Nov 06

Maybe I need some more REST

This post isn’t about sleep deprevation. Instead, the witty title is referring to everyone’s newest, favouritist buzzword: REST (or Representational State Transfer).

Scene setting with some things that have happened recently (in roughly this order):

If you hit the Amazon.com gateway page, the application calls more than 100 services to collect data and construct the page for you.

Wow. You’d think with all that reading, listening and viewing I’d be right up on the subject. Sadly I don’t feel as though that’s quite the case.

Now. I do see an advantage of a RESTful approach (particular the style currently advocated in rails), over SOAP, when dealing with something like the google adwords api1. But, what about services like currency conversion and syntax highlighting? I can’t get these to fit into a RESTful style in my head (I guess I can’t find the resource in each case). Instead, I see them as analogous to unix command line applications: pipe simple data in (an amount with two curencies or ruby code) and get simple data out (an amount in the new currency or syntax-highlighted ruby code). Actually, I see them as remote procedure calls. Are these types of services incompatible with the REST architectural style or have I missed something? I’m starting to wonder if I’m getting too hung up on REST = CRUD and therefore missing some of the more fundamental points. Either way, I definitely feel that it’d be good to see some more concrete examples in the REST vs SOAP/RPC/SOA arguments. As stated above, I’m not so great in the abstract.

1 I had a few problems when interacting with the adwords api. I don’t, however, feel that I have enough information to know whether the pain was caused by soap4r, soap, the api or just my lack of knowledge.