W3C home > Mailing lists > Public > www-ws-arch@w3.org > February 2003

Dead trout

From: Mark Baker <distobj@acm.org>
Date: Wed, 19 Feb 2003 00:02:02 -0500
To: Geoff Arnold <Geoff.Arnold@Sun.COM>
Cc: www-ws-arch@w3.org
Message-ID: <20030219000201.R19708@www.markbaker.ca>

This is so meta. 8-)

On Tue, Feb 18, 2003 at 10:35:40PM -0500, Geoff Arnold wrote:
> Representing action as state transfer is unnatural in many situations and
> wholly impractical in others. For example: consider a TroutPond resource
> which contains an arbitrary number of Trout. How, pray, do you render
> the action RemoveAllDeadTrout() as a state transfer?  One could,
> I imagine, HTTP GET the entire pond state, compute the subset pond
> containing only non-dead fish, and then HTTP PUT the result, but
> idempotency, scalability, and common sense would seem to rule that out....

How about this;

DELETE http://example.org/pond/trout/?status=dead

But sure, I understand your point, as you're preaching to the choir.
For some actions, you may have to jump through hoops to render that
action via uniform semantics.  In those cases, it could be that the
benefits of the uniform interface aren't worth the cost.

But before anybody jumps on that with "Aha!  Web services are for
those cases!", I'd point out that it's very uncommon to find such an
action in practice.

BTW, despite what I said, REST (and despite the name 8-), isn't
constrained to effecting change via state transfer.  The important
constraint from an architectural POV, is uniform semantics.  The state
transfer quality of the style is a side effect of this constraint,
as all resources have state that can be transferred.

Mark Baker.   Ottawa, Ontario, CANADA.        http://www.markbaker.ca
Web architecture consulting, technical reports, evaluation & analysis
Received on Tuesday, 18 February 2003 23:59:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:41:03 UTC