Loading ...
Sorry, an error occurred while loading the content.

18947Re: [rest-discuss] CherryPy and REST: REST vs RPC and CherryPy dispatch methods

Expand Messages
  • Mike Kelly
    Aug 4, 2012
    • 0 Attachment
      On Sat, Aug 4, 2012 at 12:56 AM, Nick Gall <nick.gall@...> wrote:

      On Fri, Aug 3, 2012 at 6:08 PM, Mike Kelly <mikekelly321@...> wrote:

      On 3 Aug 2012, at 19:35, Nick Gall <nick.gall@...> wrote:


      I've never heard that one style of dispatching is more "RESTful" than another. What most differentiates REST from RPC is the what as known as the hypermedia constraint. 

      Hmm, as far as I can tell, REST's main source of differentiation from RPC is the combination of self descriptive messaging and layered constraint which produces a system in which applications are designed as network-visible interactions as opposed to the non-visible invocations you get from RPC. All of the uniform interface subconstraints separate REST from RPC but I think self descriptive messaging is the key one from that pov

      Mike, you may have lost me. How does the requirement of self-descriptive messaging relate to style of dispatching?

      Or are you saying that self-descriptive messaging separates REST from RPC more than the hypermedia constraint?

      If you are saying the latter, then I would claim that there are lots of self-descriptive RPC architectures out there, so self-descriptive messaging does NOT separate REST from RPC nearly as much as the hypermedia constraint does. I'd also argue that the hypermedia constraint is the one that is hardest for those with a traditional RPC mindset to grok, whereas almost anyone can grok self-descriptive messaging. So in terms of the mental shift required, the hypermedia constraint is also the biggest differentiator.

      In fact, in his thesis Roy defines REST in terms of the hypermedia constraint: "This chapter introduces and elaborates the Representational State Transfer (REST) architectural style for distributed hypermedia systems." In other words, if you're not doing hypermedia, you're not doing REST.

      -- Nick

      I was saying the latter.. I'm not saying hypermedia is unimportant, just that it is not the most fundamental aspect in terms of differentiating from RPC. As far as I can tell this is reflected in the evaluation section of Roy's thesis:

      "What makes HTTP significantly different from RPC is that the requests are directed to resources using a generic interface with standard semantics that can be interpreted by intermediaries almost as well as by the machines that originate services. The result is an application that allows for layers of transformation and indirection that are independent of the information origin, which is very useful for an Internet-scale, multi-organization, anarchically scalable information system. RPC mechanisms, in contrast, are defined in terms of language APIs, not network-based applications."

      Also, even though it wasn't the point I was making, self-descriptive messaging can and does effect the style of dispatching. On the web, it's responsible for enabling the existence of web server component frameworks such as Ruby's "Rack"[1] or node.js's "Connect"[2].

    • Show all 9 messages in this topic