« RESTful Myths: Unraveling the Confusion | Main

More RESTful clarity

So I talked, well actually chatted via instant-messaging, with Steve Vinoski and I do need to clear up some points from my last blog entry.

Steve pointed out that RPC does NOT require synchronous communications. This is true. One can simulate the request-response of a remote procedure using asynchronous communications. But the idea is that RPC appear synchronous - like a programming language procedure that blocks.

Some synchronous technology can appear asynchronous. E.g. CORBA has oneway operations. And many queue based (messaging) technologies use connection based technology underneath. E.g. Some publish subscribe technologies are actually connection based. The publisher connects to the notification service and so does the subscriber when retrieving messages. They are asynchronous to the application in the sense that they are decoupled.

Back to the Steve conversation. Steve maintained that RPC basically implied location transparency. I'm not sure I agree. Though many RPC technologies have location transparency I don't think that that the orginal intent for RPC was that it have location transparency. I certainly regard come technologies today as RPC that don't have location transparency. RFC 707 doesn't mention location transparency and as it works through command/response, request/reply and procedure call models it speaks of making it easier but I don't see transparent. In fact in order not to "mislead the application programmer" the paper suggests the model be clarified with "Local procedure calls are cheap; remote procedure calls are not."

Location transparency is very often a bad thing. (more often than not as we discovered with novice developers of CORBA and distributed Java technologies and many more.) Because location transparency hides the network, this can mislead the developer and also introduces issues of extra exception handling that the developer has make sure that they cover. Steve wrote an excellent paper on some of the issues in IEEE's Internet Computing back in late 2005 - I have a copy but I don't have a public URL for it, sorry.

But one could argue this both ways. i.e. The technology is not good because it misleads the programmer OR you could say that one needs better than average programmers to develop distributed application architectures using RPC. But it seems that one could say the same thing about RESTful developers. So before we accept the former (the technology is not good) let us remember that not all REST developers are building truly RESTful based applications/services. In fact RESTful Web services points out that most REST based services are REST-RPC and not RESTful.

Again, I wish to point out that I continue to warm to REST and Resource Oriented Architectures, I see the potential, and look forward to implementing. I'm just not willing to say that REST is useful in all situations or that SOAP and WS-* are evil and there is no place for them. And, as the book points out, there is still a lot of confusion with REST based on the wide deployment of REST-RPC services rather than RESTful.

The book has this to say about breaking the uniform interface: "occasionally it's unavoidable" (p101). Even while it's undesirable. The section on POST describes this scenario. And so some "overloading" is required. Does this mean then that REST is broken? Or should the REST community loosen the definition of RESTful? Is "reshuffling" the resources acceptable, or a hack that demonstrates something that needs to be addressed with the model?

TrackBack

TrackBack URL for this entry:
http://www.ipbabble.com/blog/mt-tb.cgi/69

Comments

Hi William, just getting back to this. Regarding location transparency, I might not have made myself very clear during our IM conversation. I don't think there's anything about RPC that absolutely *requires* location transparency -- rather, I was merely stating the observation that in practice, RPC and location transparency typically go hand-in-hand. Early RPC systems were not location transparent, because their binding operations were visibly accessing remote services, but as time went on, location transparency clearly became an important goal of such systems. The hiding of whether a given target is local or remote is now so good in modern RPC-oriented systems that the only way to find out whether a given target is local or remote is to step through the code. That's why I said that RPC essentially implies location transparency.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Who is IP Babble?

William Henry IP Babble is the personal blog of William Henry. I have over 16 years experience in software development and distributed computing and hold a M.Sc from Dublin City University. I'm currently a Technical Director and Enterprise Architect at IONA Technologies Inc. This weblog is mine personally and is in no way funded by IONA. I will try to post independent views but understand that most likely I have a bias based on the influence of working with standards based middleware for about a decade. (See disclaimer below)

Disclaimer

The views expressed in this blog are solely the personal views of the author and DO NOT represent the views of his employer or any third party.