RESTful Data

February 28th, 2008  |  Published in column, coupling, integration, REST, scalability  |  2 Comments  |  Bookmark on Pinboard.in

In my Jan/Feb Internet Computing column, Serendipitous Reuse (PDF), I talked about interface coupling and the benefits of REST’s uniform interface constraint. I find that whenever you discuss that topic, though, REST detractors tend to say, “Well, you’re just pushing the coupling problems to the data.”

The problem with that assertion is that it assumes coupling is a fixed constant — if you eliminate it from one point, whatever you’ve gotten rid of just has to pop up somewhere elsewhere, like some sort of strange “Conservation of Coupling” law. Of course, that’s not true. In my latest column, Demystifying RESTful Data Coupling (PDF), I turn my attention to this claim and explain how RESTful data works, and why it too, like RESTful interfaces, reduces coupling when compared to WS-* and other similar approaches.

Constructive feedback welcomed, as always.

Responses

  1. Adam Burry says:

    February 28th, 2008 at 1:38 pm (#)

    I liked your description of C-like structs as describing the shape of bit sequences. I also liked the idea of contrasting this with self-describing data. It reminds me of the well-known statement by Hoare, “We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.”

    Compilers are able to optimize monolithic programs because at compile time they have the complete definition of the system. Therefore, they know which registers have to be pushed before a function call, and which don’t, and they know that everyone is in agreement about the “shape” of the data.

    However, in the distributed case, the notion of a compiler, a process with a complete view of the system, is not desirable. Or at least, not realistic. In this case, optimizing the data by obscuring its shape appears to be a premature optimization. We need flexibility there because we do not have all the information about what happens to the data next.

    Sections 2.4, 2.5 and 5.5 of “Structure and Interpretation of Computer Programs” by Abelson and Sussman applies here. I think even clearer than the text might be lectures 4b and 10a by the same authors found here: http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/

  2. Weekly SOA crumbs #10 - Service Endpoint says:

    March 10th, 2008 at 12:26 am (#)

    […] REST RESTful Data Idempotency of PUT, and common mistakes (via Stefan Tilkov) […]