Re: the meaning of stateless

Mark Baker <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <CALcoZirUzk7CuuKZHFNwQkMwk1-wP+-67Ue2LHhSB9f_Pcj9RA@mail.gmail.com>
On Tue, Apr 23, 2013 at 12:14 PM, Brian Craft <[email protected]> wrote:
>> > Fielding's definition didn't do much for me, because the terms aren't
>> > adequately defined,
>>
>> They are, and the definition is most definitely adequate, trust me on
>> that.
>
>
> I don't agree. Take this statement, for example:
>
> "Each request from client to server must contain all of the information
> necessary to understand the request, and cannot take advantage of any stored
> context on the server. "
>
> What does "understand" mean in this sentence? I'm not aware of a technical
> definition of "understand" as it applies to computer systems, and it's not
> defined in the paper.

This is what I'm talking about when I suggest focusing on the
interface, aka the message.

HTTP messages are generally sent between parties that know nothing of
each other, so "understand" here means exactly that; that the meaning
of the message can be understood by the recipient so its clear what
the sender is asking be done when it sends the message.

> Again, take the "query by POST" pattern. The eventual
> GET depends on a previous POST. Does the server "understand" a request that
> depends on a previous request? What about "stored context"? One would
> reasonably believe that POSTing a query creates stored context on the server
> which later requests may take advantage of. But this sentence says that it
> must not "take advantage of any stored context on the server." I assume this
> apparent contradiction is due to some different use of terms, that "stored
> context" doesn't mean what one would reasonably assume it means, or
> something. If this is a different usage of the terms, they should be defined
> somewhere.
>
> My current guess is that "understand" means that the communications layer
> can read the request and generate a valid response, including the case where
> the POST goes missing and it must return a 404: that it still "understands"
> the request even though the app can't process it since the depends on a
> previous request.
>
> But then it gets really odd with claims like "the server doesn’t have to
> manage resource usage across requests." How is a POSTed query not a resource
> on the server that must be managed across requests?

It is, but the *meaning* of future messages doesn't change if the
state of that resource changes.

Mark.


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/rest-discuss/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/rest-discuss/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.