Skip to search.
rest-discuss · REST Discussion Mailing List

Group Information

  • Members: 1401
  • Category: Protocols
  • Founded: Nov 13, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

  Messages Help
Advanced
REST clarifications...   Message List  
Reply Message #4732 of 18829 |
REST and the design of HTTP methods

On Dec 29, 2004, at 6:47 AM, Josh Sled wrote:
> As per HTTP, POST has two meanings ... "submit data-block for
> data-handling" as well as "resource {creation,annotation,extension}".
> These represent very different designs; I still think it's critical to
> distinguish the two. But, yes, they're "levels of HTTP", not "levels
> of
> REST".

Yes, it was certainly a mistake when the NCSA team introduced HTML
forms processing via POST (which at the time meant the same as NNTP's
post)
without introducing a distinctive method for "process this". However,
we
should also understand why it did not seem important at the time, and
also why it "just doesn't matter" to REST how many meanings are embodied
in HTTP's POST.

visible identifiable
method safe idempotent semantics resource cacheable
-----------------------------------------------------------
GET | X X X X X |
HEAD | X X X X X |
PUT | X X X |
POST(a) | / |
POST(p) | |
OPTIONS | X X X O |
-----------------------------------------------------------

POST(a), as "append this", is unsafe, non-idempotent, non-cacheable,
operates on an unknown resource, and has only minor visibility since
there is no way for an intermediary to anticipate the state of the
resource after the append aside from "some state was added". POST(p),
as "process this", doesn't even have that minor visibility. Thus, an
architectural style like REST can only improve the performance of a
POST-based architecture by finding ways to escape POST (e.g., 201).

Note that POST, regardless of which meaning is being used, has none of
the characteristics that would make it useful for the architecture to
know exactly what is going on. At most, we can obtain an identifiable
resource if the response is 201 and Content-Location, but that is true
of any extension method. That is why it is more efficient in a true
REST-based architecture for there to be a hundred different methods
with distinct (non-duplicating), universal semantics, than it is to
include method semantics within the body of a POST. Inspecting message
bodies to determine message semantics will always be slower than
placing the method up front.

I really should extend the table to include all of the methods that
webdav has added, just to show how disastrous it was to create PROP*
(duplicating semantics) instead of linking to the set of properties
as a separate resource. Maybe someone else has time to add that to the
wiki.

....Roy




Thu Dec 30, 2004 2:28 am

roy_fielding
Offline Offline
Send Email Send Email

Message #4732 of 18829 |
Expand Messages Author Sort by Date

Hi Group, I'm very new to REST but am interested in moving my current development effort into the model. That said, I must confess I need some clarification...
rlution Offline Send Email Dec 28, 2004
3:20 pm

... POST is more general than create, and in fact even PUT can create a resource. "create", AFAICT, emerged from the desire for some to fit the new "uniform...
Mark Baker
gonga_thrash Offline Send Email
Dec 28, 2004
6:40 pm

... It's hard to say generally, but I think you're seeing two different things: * an inherent similarity in the two methods, including a bit of a semantic...
Josh Sled
joshsled Offline Send Email
Dec 28, 2004
11:16 pm

... Josh, while that may be your theory (and you are welcome to it), the notion that there are two levels of REST is completely false. There are different...
Roy T. Fielding
roy_fielding Offline Send Email
Dec 29, 2004
2:38 am

... No, you're right; I've made the mistake of conflating REST with HTTP. ... As per HTTP, POST has two meanings ... "submit data-block for data-handling" as...
Josh Sled
joshsled Offline Send Email
Dec 29, 2004
2:46 pm

... Yes, it was certainly a mistake when the NCSA team introduced HTML forms processing via POST (which at the time meant the same as NNTP's post) without...
Roy T. Fielding
roy_fielding Offline Send Email
Dec 30, 2004
2:29 am

... I added the table to this wiki page, but no summary or descriptive text. I also added DELETE, and another section for WebDAV methods. ...
S. Mike Dierken
mdierken Offline Send Email
Dec 30, 2004
5:56 am

... OK, I have filled out what I think the properties of the WebDAV methods are (feedback appreciated): method safe idempotent semantics resource...
Julian Reschke
JulianReschke Offline Send Email
Dec 30, 2004
3:49 pm

... PROPFIND, PROPPATCH, LOCK, and UNLOCK do not have identifiable resources (they all operate by way of a third party). Is PROPPATCH always idempotent? COPY...
Roy T. Fielding
roy_fielding Offline Send Email
Dec 30, 2004
10:19 pm

... Could you please expand on what you mean by "they operate by way of a third party" (is this about the Depth request header?)? For instance, the results for...
Julian Reschke
JulianReschke Offline Send Email
Dec 30, 2004
11:03 pm

... That wasn't what I meant, though depth is certainly another can of worms. I guess that is another reason why PROPFIND is not cacheable. I meant that the...
Roy T. Fielding
roy_fielding Offline Send Email
Dec 31, 2004
6:29 am

... Correct. RFC2518 already specifies PROPFIND as non-cacheable. ... Ah! Now that depends on whether one considers those properties as different resources (as...
Julian Reschke
JulianReschke Offline Send Email
Dec 31, 2004
11:15 am

Julian Reschke wrote: [...] ... Does anyone happen to know why the functionality of PROPFIND has not simply been enabled by the definition of a set of...
Jan Algermissen
algermissen1971 Offline Send Email
Jan 1, 2005
7:20 pm

... Extensibility of header names? Internationalization considerations? Namespace operations? Updates of properties? Anyway, this: "WebDAV and the Birth of...
Julian Reschke
JulianReschke Offline Send Email
Jan 1, 2005
9:06 pm

... Yeah, Yaron's twisted little view of history. It would be more accurate to say that some people insisted HTTP could not carry internationalized data in ...
Roy T. Fielding
roy_fielding Offline Send Email
Jan 1, 2005
10:32 pm

... OK, another interesting read is in Jim Whitehead's and Yaron Goland's "The WebDAV Property Design" "<http://www.cs.ucsc.edu/~ejw/papers/spe-whitehead.pdf>....
Julian Reschke
JulianReschke Offline Send Email
Jan 2, 2005
1:34 pm

Thanks for the clarification. I have two questions. ... Do you agree that it would be better if human user agents sending HTML forms just put the contents of...
Vincent D Murphy
johnfoobar1 Offline Send Email
Dec 30, 2004
9:36 am

... [deletia] ... I continue to be confused, though. I understand the importance of orthogonality of operations [generally], but there's a tension here ...
Josh Sled
joshsled Offline Send Email
Dec 30, 2004
3:33 pm

I agree with your general point Roy, but just had a comment on something you said ... ... I was under the impression that the degree of visibility in both...
Mark Baker
gonga_thrash Offline Send Email
Dec 30, 2004
11:50 pm

... They are effectively the same, yes, but visibility is a continuous function. Just knowing something about the intent of the client may be better than...
Roy T. Fielding
roy_fielding Offline Send Email
Dec 31, 2004
7:43 am

... I haven't found a reason to use PUT rather than POST for creating a new resource. I'm still waiting for the killer example where it makes sense. Using PUT...
Vincent D Murphy
johnfoobar1 Offline Send Email
Dec 29, 2004
12:12 am

... When using PUT, the client application knows and identifies the resource that is to be replaced by the content in the request. Whether the server creates...
S. Mike Dierken
mdierken Offline Send Email
Dec 29, 2004
4:18 am

... When using PUT, the client is in control of the URI space. So take any PUT enabled file-system based Web server (like Apache) and it becomes a 'dumb ...
S. Mike Dierken
mdierken Offline Send Email
Dec 29, 2004
4:26 am

Josh, ... POST can't have two meanings per the spec., because the spec does not define a way to discriminate two meanings for POST. Or do I fail to get your...
Walden Mathews
waldenmathews Offline Send Email
Dec 29, 2004
4:21 pm

... Every time I read RFC 2616 section 9.5, I come away with two meanings: * process data * "subordinate [...] in the same way that a file is subordinate to a...
Josh Sled
joshsled Offline Send Email
Dec 30, 2004
2:25 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help