The Dining Philosophers in REST

Clay Shirky clay@shirky.com
Wed, 15 Aug 2001 08:08:01 -0400 (EDT)


> Challenge:
> 
>      "I think you in fact can't do [GET+DELETE, or more
>      generally atomic sequences of HTTP methods] within a REST
>      framework, because if you do it with two calls, you get a
>      race condition (what if the DELETE gets executed before the
>      GET?), which means you either have to violate the
>      asynchrony [?] of REST and make the interaction stateful,
>      or you have to hide the DELETE call someplace in the path
>      or query string of a GET request, which seems like a big
>      no-no, REST-wise."
> 
>         -- Clay Shirky in [decentralization]

Just to annotate that question mark, (my read of) the original REST
paper posits statelessness as one of the core pieces of the Web
framework, because the overhead of maintaining state between calls
does not scale well.

I think of this as a requirement for asynchrony, so that no two calls
can be required to be co-ordinated with one another.

I will take a look at the DP example later, as its too complex for an
early morning gloss. (Jesus, Bone, don't you have work to do?)

-clay