Is REST only adequate for applications with human-computer interaction?

43 views
Skip to first unread message

Edwin Dalorzo

unread,
May 26, 2015, 9:28:32 PM5/26/15
to restinp...@googlegroups.com
At the end of chapter 4, in the section CRUD is Good, but it's not Great it says:

Since we can implement CRUD services using a small subset of HTTP, our integration needs may be completely satisfied with few CRUD-based services. Indeed, this is typically where most so-called RESTful services stop.[42] However, it’s not the end of our journey, because for all their strengths and virtue of simplicity, CRUD services are only suited to CRUD scenarios. More advanced requirements need richer interaction models and, importantly, will emphasize stronger decoupling than CRUD allows.
To decouple our services from clients and support general-purpose distributed systems, we need to move away from a shared, tightly coupled understanding of resource life cycles. On the human Web, this model has long been prevalent when using hyperlinks to knit together sequences of interactions that extend past CRUD operations. In the next chapter, we’re going to replicate the same hypermedia concept from the Web to create robust distributed systems.

I am fairly new to building applications using the RESTful architecture. As a matter of fact, all I have done so far is categorized as Level 2 REST by Leonard Richardson and that I know Fielding would happily categorize as Non-RESTful.

I have spent hours trying to understand HATEOAS and how to reach level 4. And I see it more clearly now. I conceptualize the application as a series of state transitions, and the resources will dynamically provide links with information on how to move from one state to another.

But everything related to HATEOAS seem to be inherent of a human-computer interaction. I mean, even when the resources provide the links that enable the application user to move to the next state, it is ultimately the user the one that drives the application from one state to the other by causing the use of of the provided links.

But how are things supposed to work when we are dealing with computer-to-computer interaction? After all when it comes to service-orientation the idea of service composition is key, and we cannot naively assume that the client is always going to be a human being? Many services are designed to be consumed by non-human users, and some interactions/orchestrations might be fairly complex, the type of things that are typically modeled with things like BPM, or BPEL.

Is REST and particularly HATEOAS only usable in applications that imply human intervention and if not how is this supposed to work otherwise?

I am getting this vibe that REST is only good for certain type of solutions and inadequate for others, but literature out there has failed to explain those inadequacies and sell REST as the cure of all evil, but I just don't quite get how to use for proper service composition when humans are not the drivers.

I'd really appreciate any references or insights on this, because believe me I have two days straight reading all I have been able to find on this topic and I have not yet being able to reach any reasonable and well documented conclusions.  

Jim Webber

unread,
May 27, 2015, 5:29:54 AM5/27/15
to restinp...@googlegroups.com
Hi Edwin,

All of the examples in RiP are about computer to computer interactions. Further, Mike Amundsen's work on Client Hypermedia may help clarify too: http://amundsen.com/blog/archives/1157

Jim

Martin Stein

unread,
Dec 22, 2015, 3:32:27 PM12/22/15
to restinpractice
Yes, humans may push a button that causes the browser to request a link embedded in a Rest response. But ultimately which links to follow is decided in the code between the user and the backend. It may be one link that needs to be followed or multiple.
Reply all
Reply to author
Forward
0 new messages