November 25, 2004

Web Services are not Distributed Objects

I'm not sure if I posted this article by Werner (Web Services are not Distributed Objects) or not, but this sentence makes me cringe:

The REST principles are relevant for HTTP bindings, and for the Web server's parsing of resource names, but they are useless in the context of TCP or message-queue bindings where the HTTP verbs do not apply.


The principles of REST apply to any large-scale networked application. I wonder if he has modified his position on this.

2 comments:

Mark said...

I mentioned that to him a while back, but I guess it didn't make the cut. 8-)

Werner said...

Nope, I have not changed my position on this. Of course you can apply REST principles to messaging infrastructures that have richer (or poorer) interfaces, but only by restricting the set of methods used, or layering semantics on top of poorer interfaces.

Why do I believe REST is most useful in the context of HTTP? Next to the match with the verb set, one of its main strength is the use of the uri/url model that can be parsed by intermediaries, such as load-balancers and caches, to derive knowledge of that. Given that there is no explicit naming or verb model in TCP and a richer model for message queues you can not benefit from load-balancer/caches with adding another (restrictive) model on top of these technologies.

As always my position has been that there is great value to REST, but that it is only one model of many. There is good value to provide a consistent REST interface to your system, such that developers that feel comfortable with this approach can build their systems consitently. There is also great value to other interfaces for example such as those offered by bare bones message queuing systems, to allow other clases of developers to build their version of scalable internet application.

As to large-scale & REST; I have built too many large scale systems by now to know that many more models apply to them than just REST.