InfoQ

Interview

Pete Lacey on REST and Web Services

Interview with Pete Lacey by Stefan Tilkov on May 09, 2008 10:06 AM

Community
SOA
Topics
WS Standards,
Messaging,
Web Services
Tags
SOAP,
REST
Summary
In this interview, recorded at QCon San Francisco, (then) Burton Group consultant Pete Lacey talks to Stefan Tilkov about the reasons for his disillusionment SOAP and his opinions on how to best achieve loose coupling. Pete also describes the ideas behind REST, and addresses some of its perceived shortcomings. Finally, he discusses cases wher SOAP/WS-* or RESTful HTTP might be more appropriate.

Bio
Pete Lacey is a consultant for Burton Group, a research and advisory company. He has been active in software and IT for 20 years having previously held development, consulting, and management positions at Netscape, Cisco, and numerous startups. Pete specializes in Web-based application development and service-oriented architecture, and is well known as an advocate of the REST style approach.
This is Stefan Tilkov at QCon. I am sitting here with Pete Lacey. As usual let's try and start with: tell us a little bit about what you do
You're quite well known due to some blog posts and presentations and other things pretty heavily criticizing the WS-* space. Can you give us some background on that?
Before going into more detail about REST let's just stick to WS-* for a second. What is it that you think is wrong with it? I mean if you say that in early days it had problems of interoperability, we're assuming those are at least less, is there something fundamentally wrong with it? What's your belief now?
Can you elaborate a little on why you think these would be tightly coupled? I mean everybody is talking about loose coupling and SOAP…
Can you give us a three minute introduction to REST?
Let me ask a few questions from a REST doubter, not that I really am one, but I am trying to do my best to claim to be one. One of the things is that this is quite convincing from an information, from a read only point of view. I mean if I am reading information I think everybody will agree that it's a good thing, to make information accessible through an HTTP GET, that's nice. So why not make everything available through a HTTP Get and just be done with it?
Right. Like flickr and del.icio.us and many others.
How do I actually map my business operations to REST?
But isn't one of the strengths of mainstream SOA approach that you actually sit down with the business people and talk about a service and talk about the meaningful operations. Many people say that it is totally unrealistic to expect the business people to understand the REST model.
You mentioned that there are some properties of RESTful systems that are desirable, that are somehow created by the RESTful approach. Can you briefly explain what those properties are?
But there is a huge number of specifications on the other side, the WS-* side of things, that address a number of things that I would want to have in my application as well: like support for security, for transactions, for reliability. Isn't that something that is missing from the REST world that would have to be recreated there, end we'd end up with a whole new set of specifications?
What do you think is in store for the future of integration, do you think that WS-* will disappear and REST will win? Do you think there's a good case for both?
show all  show all

5 comments

Reply

Loose Coupling by Jean-Jacques Dubray Posted May 12, 2008 6:55 PM
Interview Link is not working by Prajwal Tuladhar Posted May 13, 2008 5:06 PM
Re: Interview Link is not working by Ryan Slobojan Posted May 13, 2008 9:15 PM
@Jean by hernan garcia Posted May 14, 2008 10:24 PM
Re: @Jean by Jean-Jacques Dubray Posted May 15, 2008 10:10 PM
  1. Back to top

    Loose Coupling

    May 12, 2008 6:55 PM by Jean-Jacques Dubray

    Pete:

    I really appreciate the precision that you use when you say:

    "I can "GET" it and maybe something interesting will come from that, and it may be all the information I need. So properly designed RESTful system is dramatically loosely coupled, whereas a properly designed SOAP WS-* based system is unfortunately tightly coupled and all you can do is your best effort to avoid more tightly coupling than necessary."

    But wouldn't you agree that your statement is incomplete? It is absolutely correct that in "GET" in REST provides one of the highest levels of decoupling. However, when actions are involved, I still don't buy the explanation that you give.

    When you say something like this:

    "what I have is some kind of payment resource that I would post my check to."
    there is an explicit agreement between the seller and the buyer. "If you do this" "I will consider this bill paid", the payBill action has not magically disappeared, it is intrinsic to the resource because it corresponds to an exact state transition of the bill/invoice. You have simply used HTTP as a communication mechanism, which IMHO, is a perfectly valid things to do. Unlike SOAP you are using a lot more of HTTP to manage the communication, but you are still communicating.

    I would also argue that If you don't express this agreement explicitly, you are actually strongly coupling the two parties involved.

    Now, when you say:

    "Not only is there a series of resources out there that you can get – you wouldn't say this to your business, you would say "Just put this in your browser", and a web application might come up, and remember it's possible to have a web application that is entirely one hundred percent RESTful."
    I would really appreciate if you could differentiate human-to-resource and resource-to-resource communications. This is the ambiguity that most people in the REST camp are relying on tell great things about REST, but in resource-to-resource interactions, the benefits are simply not there. I also would like to point out that in practice there are still very few (comparatively) web applications that are 100% REST compliant.

  2. Back to top

    Interview Link is not working

    May 13, 2008 5:06 PM by Prajwal Tuladhar

    The Full Interview Link is not working...

  3. Back to top

    Re: Interview Link is not working

    May 13, 2008 9:15 PM by Ryan Slobojan

    Thanks for the note - this link has been fixed in the news article.

  4. Back to top

    @Jean

    May 14, 2008 10:24 PM by hernan garcia

    I think that the reason why most so called REST applications are not 100% REST compliant (ex: using GET to POST or PUT resources, or passing and action as a parameter in the url resource or the POST load instead of using verbs) is because of lack of knowledge.
    This lack of knowledge can be on REST itself, on the tools (language, technologies they are using) or a mix of both.
    There is as well a tendency (at least in the MS world) to use the tools the vendor provides in the way the vendor tells you to use them. For example until recently most developers in th .Net camp believed that creating a Web Service was adding and asmx file on their solution.
    A lot of them didn't even knew that they could enable GET and POST with a simple edit of the web.config file.(Still not rest but at least make the WS easier to consume from JavaScript for example).
    I'm not saying that this is the developers fault at all, but the way they were show how to do things.
    I agree with you that the comment about pointing a web server to a REST service make as well send the wrong message and make people believe that REST services are not to be consumed by resources. A REST service is extremely easy to be consumed by a resource, specially because of the flexibility that REST gives you. If you miss the ability to generate client stub (like you do using a WSDL in SOAP) you can take a look at WADL, although only a few REST services use it.

  5. Back to top

    Re: @Jean

    May 15, 2008 10:10 PM by Jean-Jacques Dubray

    Hernan:

    thanks for your reply. I appreciate how REST works in human-browser-server interactions, i.e I can appreciate the global scope of URIs, the wonders of the uniform interface and I can appreciate that the benefit of "REST being limited to the client being told what to do next by the current state of where they are now".

    That being said, I am also one of the editors of the OASIS ebBP specification, the first one to offer a web service assembly capability and a co-author of one of the earlier versions of the SCA specification which also offers an assembly mechanism. I can assure you that "generating client stubs" is the least of my concerns for the very good reason that I am a SOA guy. SOA is about reuse. A service is a reusable IT asset, a SOA is an architecture which supports building solutions from existing assets. My assets are not "generated" they are already built. I assemble them to support new units of work. REST as it is defined by Roy or by a small community of people does not support an "assembly mechanism" precisely because of the "uniform interface" constraint. True resources inter-act with each other, their interactions are not always mediated by humans. "Machines" can't use REST alone, they can't use a uniform interface to interact.

Exclusive Content

Rationalizing the Presentation Tier

Thin client paradigm characterized by web applications is a kludge that needs to be repudiated. Old compromises are no longer needed and it's time to move the presentation tier to where it belongs.

Agile Project Management: Lessons Learned at Google

In this presentation filmed during QCon 2007, Jeff Sutherland, the creator of Scrum, talks about his visit at Google to do an analysis of Google's first implementation of Scrum.

AtomServer – The Power of Publishing for Data Distribution

In this article, Bryon Jacob and Chris Berry introduce AtomServer, their implementation of a full-fledged Atom Store based on Apache Abdera, which is now available as open source.

An Introduction to Virtualization

It is easy to think that virtualization applies only to servers. In reality the recent resurgence of the concept is also being applied to networking, storage, and application infrastructure.

REST Anti-Patterns

In this article, Stefan Tilkov explains some of the most common anti-patterns found in applications that claim to follow a "RESTful" design and suggests ways to avoid them.

Choosing between Routing and Orchestration in an ESB

In this article, Adrien Louis and Marc Dutoo discuss the differences and relative merits of using orchestration vs. routing in a typical ESB setup, and discuss various implementation options.

Enterprise Batch Processing with Spring

Wayne Lund discusses batch processing, Spring Batch objectives and features, scenarios for usage, Spring Batch architecture, scaling, example code, failures and retrying, and the future roadmap.

User Story Estimation Techniques

Developer Jay Fields draws on his experiences as a ThoughtWorks consultant to describe effective user story estimation techniques.