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

15781Re: [rest-discuss] Restful Approaches to some Enterprise Integration Problems

Expand Messages
  • Jan Algermissen
    Jul 1, 2010
      On Jun 30, 2010, at 11:40 PM, Bryan Taylor wrote:

      > Jan wrote:
      >> I found the Rest-* effort at http://www.jboss.org/reststar . The name of this project tweaks me, but some of the specs under it seem relevant.
      > Roy on REST-*: http://tech.groups.yahoo.com/group/rest-discuss/message/13266 ('nuf said :-)
      > I agree these have nothing to do with REST exactly, and I hate the REST-* name. The individual specs seem to try to create RESTful implementations of integration patterns in the same way as Atom and AtomPub attempt to solve pub/sub in a RESTful way. That said, Roy's statement "this is the single dumbest attempt at one-sided 'standardization' of anti-REST architecture" seems mysterious to me

      There was discussion of REST-* on this list when it came out and IIRC the criticism was quite well explained in those posts. Check out the postings around the date of the quoted posting by Roy.

      Basically the problem is that REST-* attempts to bend REST to match the usuall enterprisey mind set, claiming that this and that would be a must-have. What should really happen is that "enterprise people" learn from the Web and adjust their mind set to pruodcue systems that are less complex and more easily evolvable.

      It just makes no sense to claim complexity is necessary just because one fails to understand how to make things simpler. REST-* originates from this kind of thinking and hence claims that there are lots of things that need to be addressed.

      The truth is that all we need is proper media types and a little more guidance how the Web kind of doing things can be applied in enterprise contexts (e.g. match the open, 'Darwinistic' way to an environment that simply needs a little more planning and budgeting).

      > and is quite conclusory. How did he leap from these being about something other than REST to them being "anti-REST". Would AtomPub become anti-REST if it had been wrongly renamed RestPub?
      > He makes two assertions that follow:
      > - Distributed transactions are an architectural component of non-REST interaction.

      which is true because they violate REST's stateless server constraint (among others I guess).

      > - Message queues are a common integration technique for non-REST architectures.

      Yes, because they violate the hypermedia contraint (would need to check which else).

      > I could also make the statement that pub/sub syndication models are a common integration techniques for non-REST architectures, which would not prove that Atom and AtomPub are non-RESTful.

      Note that AtomPub is essentially a media type specification that defines the semantics of several hypermedia controls (e.g. the edit-link relation). AtomPub uses straight-forward HTTP for communication between client and server. Actually it would not need to say anything about that but provides the HTTP interaction examples as developer hints.

      The HTTP-based use of the formats specified by AtomPub is not PubSub but polling. An AtomPub client polls feeds via GET to check whether the feed has changed.

      Also note that PubSub is not forbidden by REST. There is simply no appropriate method in HTTP for doing pubsub but you can allways add one in if PubSub is the right model for you (see [1],[2]).

      PubSub with HTTP works like this:

      WATCH /some/feed
      Reply-To: http://www.my.org/notification-processor

      The server could then POST to the Reply-To URI.

      (But I doubt that it is ever really of practical relevance. I'd go with polling due to the much greater simplicity).

      > There are patterns of integration, and I expect to find them in every architectural style.

      This is an interesting topic because you can start this train of thought one level up: If your problem space requires interation (the Web does, and enterprise IT clearly also does) then it is much wiser to pick an architectural style that is tailored towards dealing with integration. Such a style must constrain the connectors (think component API) to be uniform because only then can you avoid to have to do point to point integration every time two components talk to each other.

      REST is such a style (surprise, surprise :-) through and through. REST has been designed to deal with integration problems (complexity and change).

      Interestingly, no OO-based pattern (especially not the service pattern) out there attempts to constrain the connectors of components. That is why all these attempts (e.g. SOA) are essentially meaningless when it comes to reducing integration complexity. IOW, they cannot guarrantee reduced complexity and good evolvability - REST does because it limits the variation of the component interface (to be uniform).

      > If there is some impossibility conjecture here, I'd like to see it stated in a more analytic way, without the bashing.

      Maybe - but then... he has said it all before and REST reall is one of those things on earth that are *not* up to interpretation.

      Additionally - that is his style and I presonally find it very refreshing. I only lack the competence to adopt it :-)

      > It may be that a distributed transaction pattern must must violate one of the RESTful architecure principles, but this is far from obvious.

      It requires understanding of REST, yes. OTH, most of the problems people have (at least I did) is due to the fact that 'they' lack proper knowledge of software architecture in general (See Perry&Wolf, Garlan&Shaw, Taylor&Medvidovic and the first half of Roy's dissertation). If you started with that knowledge already - understanding REST would be pretty quick as would be understanding the rationale behind the mentioned constraint violation. (Personally the journey took me about 8 years and I keep having epiphanies :-)

      > Maybe this is some deep corollary of the CAP theory or something. Or perhaps not.
      > The corresponding statement about message queues seems baffling. These solve a harder problem than guaranteed delivery. Queues solve guaranteed delivery to exactly one consumer among competing consumers with some fairness guarantees.

      Well, that is a layer 4 issue (transport). What do MQs do in terms of reducing integration complexity or making a system more easily changeable? All the latter is a layer 7 issue.

      > How would I implement a RESTful way to have airport passengers acquire taxi transportation at the airport in a fair way?

      POST /taxi-requests
      Content-Type: application/procurement+xml
      <transport-request from="airport" goods="passenger"/>

      201 Created
      Location: /taxi-requests/778 ----------<< Your process instance resource
      Content-Location: /taxi-requests/778
      Cache-Control: no-cache
      Content-Type: application/procurement+xml

      <transportation> --------------------<< Your process instance data
      <status>on its way</status>
      <estimated-arrival>07:03 PM</estimated-arrival>
      <receipt href="./receipt"/>

      Check status:

      GET /taxi-requests/778

      obtain receipt:

      GET /taxi-requests/778/receipt



      [1] http://roy.gbiv.com/untangled/2008/paper-tigers-and-hidden-dragons
      [2] http://roy.gbiv.com/untangled/2008/economies-of-scale

      Jan Algermissen, Consultant
      NORD Software Consulting

      Mail: algermissen@...
      Blog: http://www.nordsc.com/blog/
      Work: http://www.nordsc.com/
    • Show all 45 messages in this topic