"I have a mind like a steel... uh... thingy." Patrick Logan's weblog.

Search This Blog

Friday, August 05, 2005

Arbitrarily Complex Messages

SOAP vs. HTTP... Phil Windley blogs about Randy Ray's talk at OSCON 2005. Ray suggests an example where SOAP is better than HTTP. Phil's paraphrasing...

The CalculateRoute API allows not just a start and end point, but also an arbitrary number of waypoints along the way (to calculate the route for an entire trip).

Since this is a constant resource—the route won’t change (much)—this should be a GET request with a URL. Designing such a GET request is difficult. There’s no real standard for creating a REST protocol. There’s no WSDL.

But we can get WSDL and SOAP to fall down flat as well. This route calculator takes a fairly simple list of values. A more complex calculator could take fuzzy values... for example a preference rather than a requirement to travel through a particular location, or a preference to travel through a particular location if the total trip time is not more than N time units, or...

The example can easily exceed the ease of expressing in WSDL. Then what's the value of WSDL? WSDL maps fairly well onto currently popular imperative languages, not very well onto constraint logic programming languages or deductive logic languages, or...

GET in HTTP seems to me similar to an object reference. Sometimes a query is needed to get the reference in the first place. But once I have it, I can "dereference" it over again.

I suppose POST is the means to do the query, and POST can take arbitrary data just like a parameter in a WSDL definition.

So I guess I don't get the argument. Certainly WSDL is not the end of the story except for some small set of convenient API's similar to those you'd write in Java, C#, or C++.

No comments:

Blog Archive

About Me

Portland, Oregon, United States
I'm usually writing from my favorite location on the planet, the pacific northwest of the u.s. I write for myself only and unless otherwise specified my posts here should not be taken as representing an official position of my employer. Contact me at my gee mail account, username patrickdlogan.