Search the web
Sign In
New User? Sign Up
rest-discuss · REST Discussion Mailing List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Click here for the latest updates on Groups Message search

Messages

  Messages Help
Advanced
RESTful ordering and order-rejection   Topic List   < Prev Topic  |  Next Topic >
Reply  | 
Re: [rest-discuss] 'No application data on client' constraint? was: RESTful ordering and order-rejection

Jan,

I've had some success using HTTP's own CRLF delimeter as this
partition; that is to say, leaving the entity-body "8-bit clean" for
native representations in various formats and confining the meta-model
(links, categories, attributes) to the HTTP headers.

See OCCI core spec and HTTP interface at occi-wg.org where I'm also
defining an XHTML rendering for a consolidated human & programmable
web interface (semweb w microformats/RDFa etc).

Sent from my iPhone

On 04/11/2009, at 9:17, Jan Algermissen <algermissen1971@...> wrote:

>
> On Nov 4, 2009, at 3:20 AM, mike amundsen wrote:
>
>> Jan:
>>
>> As a quick follow-up on the notion of the "getting away from..."
>> issue:
>>
>> Since HTTP is a testable spec, and REST is most commonly discussed in
>> regards to HTTP, it is a short leap to consider REST-fulness to also
>> be testable; to expect there to be a "right way" to implement REST
>> over HTTP just as there is a correct way to implement the HTTP
>> application protocol.
>
> But my question is related to resource design and hypermedia design,
> not
> about how to implement HTTP.
>
> If we view linking to be part of the resource design and hypermedia
> to just be a means of serializing resource state and resource
> relationships (linking) than my question is really only about
> resource design.
>
> So, IOW, I am looking for principles that apply to the partitioning
> of the application data (resource model) and to the design of the
> relationships between the application data partitions.
>
> Probably it makes sense to ask if the application data partitioning
> may extend to the client? Is it 'valid' to put application data on
> the client that is not also maintained on the server? I think that
> is likely to be the essence of the original question.
>
> Jan
>
>
>
>> But this is not a reasonable goal. In fact, it
>> can be a hurdle to building workable applications using the style.
>>
>> mca
>> http://amundsen.com/blog/
>>
>>
>>
>>
>> On Mon, Nov 2, 2009 at 18:51, Jan Algermissen
>> <algermissen1971@...> wrote:
>>>
>>> On Nov 3, 2009, at 12:13 AM, mike amundsen wrote:
>>>
>>>> Jan:
>>>>
>>>> <snip>
>>>> I am trying to get away from the "you could do this and you could
>>>> do
>>>> that but you also could do it that way" kinds of answers to
>>>> practical
>>>> REST design questions.
>>>> </snip>
>>>>
>>>> Why do you want to get away from this?
>>>
>>> Because it does not exactly sell good if you cannot back up advice
>>> you give
>>> by principles. One of the things I admire about the Software
>>> Architecture
>>> notion laid out by Perry/Wolf, Garlan/Shaw and Roy [1] is that it
>>> creates a
>>> foundation for backing up architectural design decisions by
>>> principles. And
>>> I just get this feeling of hand waving when it comes to answering
>>> questions
>>> about 'how do I do X'. I don't mind that there are many solutions
>>> (otherwise
>>> there would not be any room for design) but (at least) I often
>>> cannot
>>> articulate a clear reasoning why and when to prefer one over the
>>> other.
>>>
>>> Take the example problem I posted. What is better for
>>> order-rejection-with-suggested-modification? To send 409 and e.g. a
>>> UBL-like
>>> order-response document (like you would in the non computerized
>>> business
>>> world) or to create an order resource anyhow, set the status to
>>> pending and
>>> then let the client update the order until it can be accepted?
>>>
>>> (I had a hunch that the latter is better than the former because it
>>> maintains application data on the server only)
>>>
>>> Likewise, several return codes have been suggested (409, 422 for
>>> example).
>>> It makes no sense to have different returns codes specified when a
>>> group
>>> like this one cannot provide a spot-on 'yeah, it is that one and
>>> only that
>>> one' response.
>>>
>>> And even if there is a single best answer - how do you get
>>> interoperability
>>> if it is so easy for different people to have different opinions
>>> about it?
>>>
>>> Jan
>>>
>>>
>>> [1] Excuses for the names missing here
>>>
>>>
>>>
>>>>
>>>> mca
>>>> http://amundsen.com/blog/
>>>>
>>>>
>>>>
>>>>
>>>> On Mon, Nov 2, 2009 at 17:09, Jan Algermissen <algermissen1971@...
>>>>>
>>>> wrote:
>>>>>
>>>>> On Nov 2, 2009, at 10:52 PM, Nick Gall wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Nov 2, 2009 at 4:16 PM, Jan Algermissen <algermissen1971@...
>>>>>>>
>>>>>>> wrote:
>>>>>>
>>>>>>> My hunch is that in a RESTful system
>>>>>>>
>>>>>>> a) all application state (aka session state) is on the client
>>>>>>> b) all application data resides on the server (as resource
>>>>>>> state)
>>>>>>>
>>>>>>> The question that drives me is what the significance of resource
>>>>>>
>>>>>> state
>>>>>>>
>>>>>>> is (what is its meaning/purpose in a given design? What are the
>>>>>>
>>>>>> design
>>>>>>>
>>>>>>> conditions that lead to the creation of new resource state?
>>>>>>> Etc.)
>>>>>>
>>>>>> I am
>>>>>>>
>>>>>>> trying to get away from the "you could do this and you could do
>>>>>>> that
>>>>>>> but you also could do it that way" kinds of answers to practical
>>>>>>
>>>>>> REST
>>>>>>>
>>>>>>> design questions.
>>>>>>
>>>>>> I think I see what you are driving at with your distinction
>>>>>> between
>>>>>> session state vs resource state, but I don't think the
>>>>>> distinction
>>>>>> is so clean in REST. Here's a relevant passage from Roy's thesis
>>>>>> (5.3.3):
>>>>>>
>>>>>> The application state is controlled and stored by the user agent
>>>>>> and
>>>>>> can be composed of representations from multiple servers. In
>>>>>> addition to freeing the server from the scalability problems of
>>>>>> storing state, this allows the user to directly manipulate the
>>>>>> state
>>>>>> (e.g., a Web browser's history), anticipate changes to that state
>>>>>> (e.g., link maps and prefetching of representations), and jump
>>>>>> from
>>>>>> one application to another (e.g., bookmarks and URI-entry
>>>>>> dialogs).
>>>>>> [emphasis added]
>>>>>>
>>>>>> So at least a copy of the resource state (in the form or a
>>>>>> representation of that resource) is intended to be stored and
>>>>>> manipulated on the client side. For example, I believe this 5.3.3
>>>>>> paragraph endorses the following scenario:
>>>>>> • client receives a representation of the works of art in a
>>>>>> museum
>>>>>> exhibit as list of art works (name of work, name of artist)
>>>>>> from a
>>>>>> museum service on some museum server
>>>>>> • the client extracts the name of an artist (a string) from
>>>>>> the
>>>>>> list and submits it to Wikipedia on a different set of servers
>>>>>> • It takes the representation from Wikipedia and formats it
>>>>>> into a
>>>>>> popup for the user's UI visualization of the museum exhibit
>>>>>> In this scenario the client "jumps from one application (museum
>>>>>> service) to another (Wikipedia)", submitting representation data
>>>>>> it
>>>>>> received from the first service to the second service. Your
>>>>>> description above seems to prohibit such a scenario ("to continue
>>>>>> its interaction with the service on another machine, it would not
>>>>>> only need to take the appropriate URIs with it ... but also other
>>>>>> data elements").
>>>>>>
>>>>>
>>>>> But in your scenario, the client could allways, just be use of
>>>>> the one
>>>>> initial URI, pick up the interaction. And this is (IMHO) exactly
>>>>> the
>>>>> significance of storing the application data as resource state -
>>>>> so
>>>>> that the client can pick it up again. If the data was not stored
>>>>> in
>>>>> the server it would have to be stored on the client and the
>>>>> ability
>>>>> would be lost to pick up the conversation just on the basis of
>>>>> the URI.
>>>>>
>>>>> Jan
>>>>>
>>>>>
>>>>>
>>>>>> It appears that REST endorses the use of "application data"
>>>>>> stored
>>>>>> on the client, at least in the case where such data was at some
>>>>>> point in the past received by the client as part of a
>>>>>> representation
>>>>>> of a server-based resource.
>>>>>>
>>>>>> -- Nick
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --------------------------------------
>>>>> Jan Algermissen
>>>>>
>>>>> Mail: algermissen@...
>>>>> Blog: http://algermissen.blogspot.com/
>>>>> Home: http://www.jalgermissen.com
>>>>> --------------------------------------
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------
>>>>>
>>>>> Yahoo! Groups Links
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> ------------------------------------
>>>>
>>>> Yahoo! Groups Links
>>>>
>>>>
>>>>
>>>
>>> --------------------------------------
>>> Jan Algermissen
>>>
>>> Mail: algermissen@...
>>> Blog: http://algermissen.blogspot.com/
>>> Home: http://www.jalgermissen.com
>>> --------------------------------------
>>>
>>>
>>>
>>>
>>
>>
>> ------------------------------------
>>
>> Yahoo! Groups Links
>>
>>
>>
>
> --------------------------------------
> Jan Algermissen
>
> Mail: algermissen@...
> Blog: http://algermissen.blogspot.com/
> Home: http://www.jalgermissen.com
> --------------------------------------
>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>



Wed Nov 4, 2009 8:48 am

sam.johnston...
Offline Offline
Send Email Send Email

 | 
Expand Messages Author Sort by Date

Hi, suppose the following media types do exist: - application/procurement-order for orders - application/procurement-orderrejection for order rejections also...
Jan Algermissen
algermissen1971
Offline Send Email
Oct 30, 2009
11:03 pm

Jan: One approach is to allow for the creation of an order that always results in an order resource that has a "pending" status element. POST /orders .. <order...
mike amundsen
mamund
Offline Send Email
Oct 31, 2009
1:58 am

... Yeah - I came to understand that 303 can be used to notify the client about a resource state change recently (thanks to some posting by Roy). I like that...
Jan Algermissen
algermissen1971
Offline Send Email
Oct 31, 2009
9:09 am

Tim, ... Yes, I usually agree. I forgot to say that with the example I wanted to stress the point that the document types for order and order-rejection already...
Jan Algermissen
algermissen1971
Offline Send Email
Oct 31, 2009
9:02 am

On Fri, Oct 30, 2009 at 6:01 PM, Jan Algermissen ... That's tricky, in the general sense. The business protocol here (above the application protocol) is called...
Bob Haugen
bob.haugen@...
Send Email
Oct 31, 2009
10:14 am

... I am trying to rule out the abve approach by deriving from REST's constraints. Here is my thinking: I assume (because I am not able yet to derive that from...
Jan Algermissen
algermissen1971
Offline Send Email
Nov 1, 2009
8:17 pm

Application state is the state of the application, that spans both the client and the server. There is no constraint preventing state residing on the client,...
Sebastien Lambla
serialseb
Offline Send Email
Nov 2, 2009
8:43 pm

... A request in a local cache is not what I mean by application data. Suppose a service were designed in a way that it would require the client to store data...
Jan Algermissen
algermissen1971
Offline Send Email
Nov 2, 2009
9:16 pm

On Mon, Nov 2, 2009 at 4:16 PM, Jan Algermissen <algermissen1971@...> ... I think I see what you are driving at with your distinction between session state...
Nick Gall
nick_gall_1117
Offline Send Email
Nov 2, 2009
9:53 pm

... But in your scenario, the client could allways, just be use of the one initial URI, pick up the interaction. And this is (IMHO) exactly the significance of...
Jan Algermissen
algermissen1971
Offline Send Email
Nov 2, 2009
10:13 pm

Jan: <snip> I am trying to get away from the "you could do this and you could do that but you also could do it that way" kinds of answers to practical REST...
mike amundsen
mamund
Offline Send Email
Nov 2, 2009
11:14 pm

... Because it does not exactly sell good if you cannot back up advice you give by principles. One of the things I admire about the Software Architecture...
Jan Algermissen
algermissen1971
Offline Send Email
Nov 2, 2009
11:51 pm

Jan: As a quick follow-up on the notion of the "getting away from..." issue: Since HTTP is a testable spec, and REST is most commonly discussed in regards to...
mike amundsen
mamund
Offline Send Email
Nov 4, 2009
2:20 am

... But my question is related to resource design and hypermedia design, not about how to implement HTTP. If we view linking to be part of the resource design...
Jan Algermissen
algermissen1971
Offline Send Email
Nov 4, 2009
8:17 am

Jan, I've had some success using HTTP's own CRLF delimeter as this partition; that is to say, leaving the entity-body "8-bit clean" for native representations...
Sam Johnston
sam.johnston...
Offline Send Email
Nov 4, 2009
8:49 am

2009/11/2 Jan Algermissen <algermissen1971@...> ... That makes some sense to me, although my hunch would be more like a) all application state is on the...
António Mota
amsmota
Offline Send Email
Nov 3, 2009
11:55 pm

... Well I don't think it is necessarily the case that the response to every request *replaces* the application state on the client. That is, a response can be...
wahbedahbe
Offline Send Email
Nov 4, 2009
5:00 am

... No, certainly not. I hope I did not create the impression I mean that. The client builds up application state as it proceeds through the applications state...
Jan Algermissen
algermissen1971
Offline Send Email
Nov 4, 2009
8:29 am
Advanced

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