More REST and IDL

January 20th, 2008  |  Published in CORBA, HTTP, IDL, REST, services, WSDL  |  4 Comments  |  Bookmark on

Regarding the REST and IDL discussion, Joe Gregorio already wrote an excellent explanation six months ago. Perhaps the rest of us should have just linked to it to begin with and avoided wasting our time rehashing it all.

But then again, rehashing is fun! :-) On the same topic, I agree with much of what Dare said, except for this:

When building services with WS-*, you have a WSDL to describe your methods & expected inputs/outputs and XSD schema(s) to describe the schemas for said inputs/outputs. When building a RESTful Web Service, the need for both of these documents does not go away regardless of how often you repeat the phrase “uniform interface”.

I still disagree. The HTTP verb set defines a RESTful uniform interface. When comparing CORBA IDL or WSDL to HTTP web services, that verb set must be considered because it’s the only thing that you can directly relate to IDL and WSDL interfaces. Otherwise, you’re talking apples and oranges. The uniform HTTP interface is the only way for applications to interact with web resources in the same sense that CORBA applications interact with CORBA objects, and WSDL applications interact with WSDL services.

Much of the typical IDL and WSDL definition is devoted to defining one or more specialized interfaces consisting of specialized methods/operations and specialized data types to pass across them. For web resources that use the uniform interface, however, there’s simply no need whatsoever to define interfaces like that. What are you going to do, define GET again and again for each of your resources, each time with exactly the same semantics already specified in RFC 2616? Obviously not.

It’s easy to see that Joe’s OpenSearch document bears no semantic resemblance to a CORBA IDL or WSDL definition. Similarly, an AtomPub service document is nothing like IDL or WSDL either. Both of those documents essentially inform you of service URIs and media types, but they don’t define methods or operations. They don’t have to, because of the HTTP uniform interface. That’s important, and it’s why I disagree with Dare’s point quoted above.

Consider the mindset of the CORBA and WS-* developer. They use systems that force them to always think about all their service endpoints in terms of specialized interfaces. Given how much time I’ve spent in that world (and don’t forget, I still use CORBA too), I know for certain that the concept of the uniform interface is one of the big items that trips these developers up when they try to figure out what REST is about. It’s therefore important to keep the uniform interface as part of the conversation.


  1. Bill Burke says:

    January 21st, 2008 at 4:08 pm (#)

    I’d still rather look at schema than WSDL any day of the week. With WSDL I have to look at both WSDL *and* schema.

  2. Bill Burke says:

    January 21st, 2008 at 5:06 pm (#)

    Joe’s OpenSearch document doesn’t define methods or operations, but it sure does define parameters. Although Joe’s thingy doesn’t “look” semantically the same as IDL, it is still providing the same semantic information except most of it is implicit.

    BTW, I’m not saying I want RESTful IDL, just that I think in this case, your argument is flawed. The IDL vs. Human Doc was a better argument.

  3. steve says:

    January 21st, 2008 at 6:11 pm (#)

    Bill: to me it looks like Joe’s document is using URI templates to instruct the client how to locate resources. The fact that the URI template in the example contains a query string is immaterial, since the same approach would work for URIs that don’t have query strings.

  4. links for 2008-01-23 « Object neo = neo Object says:

    January 23rd, 2008 at 6:25 pm (#)

    […] More REST and IDL :: Steve Vinoski‚Äôs Blog (tags: restful) […]