Loading ...
Sorry, an error occurred while loading the content.

REST <=> follow your nose?

Expand Messages
  • Ruben Verborgh
    Hi REST people, Some simple questions that might lead to interesting discussions: How far do you agree that REST and hypermedia are about following one’s
    Message 1 of 6 , Apr 2 3:44 AM
    • 0 Attachment
      Hi REST people,

      Some simple questions that might lead to interesting discussions:

      How far do you agree that REST and hypermedia are about following one’s nose?
      Is the “following your nose” thing an essential part of REST?
      And what is there more to REST than can be explained by “following your nose”?

      All input welcome!

      Best,

      Ruben

      PS This post was inspired by Erik Wilde’s blogpost about describing REST – http://dret.typepad.com/dretblog/2012/03/rest-layers.html
    • Erik Wilde
      hello ruben. ... i think it s essential, it means that when you re exploring hyperlinked resources, both the links and the resources need to follow an
      Message 2 of 6 , Apr 2 10:04 AM
      • 0 Attachment
        hello ruben.

        On 2012-04-02 3:44 , Ruben Verborgh wrote:
        > How far do you agree that REST and hypermedia are about following one’s nose?
        > Is the “following your nose” thing an essential part of REST?
        > And what is there more to REST than can be explained by “following your nose”?

        i think it's essential, it means that when you're exploring hyperlinked
        resources, both the links and the resources need to follow an agreed-on
        framework of self-description (link relation types and media types, on
        the web). anybody designing within that framework can create new link
        relations and/or media types, and clients navigating through that space
        have an easy way to understand that they follow paths with known
        semantics ("i know that link relation") or encounter resources with
        known semantics ("i know that media type").

        what's important for a service provider in addition to that might be to
        give clients an understanding of the set of link relations and media
        types they might encounter for a "service web" at a given point in time.
        for example, thinking back to 10 years ago, how would you have
        communicated the fact that "the web" back then was mostly HTML, GIF,
        JPEG, RSS? today, you might add PNG and Atom to this list, and maybe
        feed paging.

        our goal is to have a simple way of bundling these concepts (link
        relation types and media types) and communicating them to clients as a
        guide to what might happen when they follow their nose in the hypermedia
        space exposed by our services. "this is what you definitely should
        accept, and of course, you should always expect unknown things to show
        up as well", this is what we as service providers would like to be able
        to say, and in addition to that, they might even want to provide an
        actual map (a subset) of the resources they are serving, which would be
        the sitemap model. such a servicemap would pretty much point your nose
        at very many resources immediately, and you could either just be happy
        with those resources, or you might follow links from them to more
        resources. i think it is important to keep in mind that a sitemap,
        looked at as a resource, is a very RESTful thing in itself, it contains
        a (large) set of links, and clients can find such a map and use such a
        map purely by "follow your nose" principles.

        cheers,

        dret.

        --
        erik wilde | mailto:dret@... - tel:+1-510-2061079 |
        | UC Berkeley - School of Information (ISchool) |
        | http://dret.net/netdret http://twitter.com/dret |
      • Nick Gall
        There s a lot more to REST than just follow your nose. IMO, the most important REST principle is the principle of generality. See
        Message 3 of 6 , Apr 2 1:53 PM
        • 0 Attachment
          There's a lot more to REST than just "follow your nose." IMO, the most important REST principle is the principle of generality. See  http://tech.groups.yahoo.com/group/rest-discuss/message/8873 . 

          Also, "follow your nose" may not mean exactly what you think it means. See  http://www.w3.org/wiki/FollowYourNose and  http://www.w3.org/wiki/FollowLinksForMoreInformation .

          -- Nick

          Nick Gall
          Phone: +1.781.608.5871
          Other Contact Info: http://profiles.google.com/NickGall/about


          On Mon, Apr 2, 2012 at 6:44 AM, Ruben Verborgh <ruben.verborgh@...> wrote:
          Hi REST people,

          Some simple questions that might lead to interesting discussions:

          How far do you agree that REST and hypermedia are about following one’s nose?
          Is the “following your nose” thing an essential part of REST?
          And what is there more to REST than can be explained by “following your nose”?

          All input welcome!

          Best,

          Ruben

          PS This post was inspired by Erik Wilde’s blogpost about describing REST – http://dret.typepad.com/dretblog/2012/03/rest-layers.html

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

          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:
             rest-discuss-digest@yahoogroups.com
             rest-discuss-fullfeatured@yahoogroups.com

          <*> To unsubscribe from this group, send an email to:
             rest-discuss-unsubscribe@yahoogroups.com

          <*> Your use of Yahoo! Groups is subject to:
             http://docs.yahoo.com/info/terms/


        • Erik Wilde
          hello. ... just to avoid any confusion: these are semweb definitions of what as link and following a link means or should mean, and there is quite a difference
          Message 4 of 6 , Apr 2 2:11 PM
          • 0 Attachment
            hello.

            On 2012-04-02 13:53 , Nick Gall wrote:
            > Also, "follow your nose" may not mean exactly what you think it means.
            > See http://www.w3.org/wiki/FollowYourNose and
            > http://www.w3.org/wiki/FollowLinksForMoreInformation .

            just to avoid any confusion: these are semweb definitions of what as
            link and following a link means or should mean, and there is quite a
            difference between how links are conceptualized in REST and in semweb.

            cheers,

            dret.
          • Ruben Verborgh
            Hi Erik, ... Fully agree on that ;-) ... That brings me to an interesting point: somehow, “following your nose” and “specific media types” have always
            Message 5 of 6 , Apr 3 12:05 AM
            • 0 Attachment
              Hi Erik,

              > i think it's essential

              Fully agree on that ;-)

              > it means that when you're exploring hyperlinked resources, both the links and the resources need to follow an agreed-on framework of self-description (link relation types and media types, on the web). anybody designing within that framework can create new link relations and/or media types, and clients navigating through that space have an easy way to understand that they follow paths with known semantics ("i know that link relation") or encounter resources with known semantics ("i know that media type”).

              That brings me to an interesting point: somehow, “following your nose” and “specific media types” have always felt like some kind of contradiction to me.
              Fielding puts emphasis on media type definition:
              “A REST API should spend almost all of its descriptive effort in defining the media type(s) used for representing resources and driving application state, or in defining extended relation names and/or hypertext-enabled mark-up for existing standard media types.”

              So the paradox to me here is:
              - the more specific a media type (or relation name) is, the better a client can follow its nose
              - but if a media type is specific, it can only be consumed by specific agents that have been programmed for that task, so in how far are they following their nose?

              > what's important for a service provider in addition to that might be to give clients an understanding of the set of link relations and media types they might encounter for a "service web" at a given point in time. for example, thinking back to 10 years ago, how would you have communicated the fact that "the web" back then was mostly HTML, GIF, JPEG, RSS? today, you might add PNG and Atom to this list, and maybe feed paging.

              Also agree here (not coincidentally because I’m working on service descriptions that indeed try to contain the expectations about possible links).

              > our goal is to have a simple way of bundling these concepts (link relation types and media types) and communicating them to clients as a guide to what might happen when they follow their nose in the hypermedia space exposed by our services.

              Interesting, and that’s not unlike what we are doing.
              Although I know that some people are skeptical about the idea. As in: is it really “following your nose” if you already explain beforehand what’s going to happen?
              I think it is, but maybe not everyone’s convinced.

              > i think it is important to keep in mind that a sitemap, looked at as a resource, is a very RESTful thing in itself, it contains a (large) set of links, and clients can find such a map and use such a map purely by "follow your nose" principles.

              They can, provided they understand the link relations.
              To what extent you think this is possible with generic clients?

              Best,

              Ruben
            • Jorn Wildt
              ... In order to answer this question you must first define how you interpret generic client ? Here is one interpretation: A generic client is a client that
              Message 6 of 6 , Apr 3 1:15 AM
              • 0 Attachment
                Comments inline:

                > > i think it is important to keep in mind that a sitemap, looked at as a resource, is a very RESTful thing in itself, it contains a (large) set of links, and clients can find such a map and use such a map purely by "follow your nose" principles.
                >
                > They can, provided they understand the link relations.
                > To what extent you think this is possible with generic clients?

                In order to answer this question you must first define how you interpret "generic client"? Here is one interpretation:

                A "generic client" is a client that understands the "processing model" of a various media-types. It knows how to 1) parse data, and 2) discover hyper-media controls (affordances) like links and forms. It does not know what the data represents in more domain specific terms (like sales orders, persons, weather maps and so on).

                Generic clients can only handle generic tasks. Like Google - it knows how to 1) parse HTML (and more), and 2) follow links. Thus it can "understand" the data in a broad generic way and extract words without any domain specific knowledge.

                So, to answer your question, yes, generic clients can follow a site map, given that it is represented in a standard format with hyper-media controls (this excludes plain XML and JSON). It can discover all available links and follow them, but given that it is a generic client it can, not suprisingly, only do generic stuff with it - it knows the "HOW to work with this data", but not the "WHAT is this data anyway".

                > That brings me to an interesting point: somehow, "following your nose" and "specific media types" have always felt like some kind of contradiction to me.

                > So the paradox to me here is:
                > - the more specific a media type (or relation name) is, the better a client can follow its nose

                I think it is important to avoid mixing media types and relation names. Again, a media-type defines the "HOW to work with the data" in terms of 1) parsing and 2) discovering hyper-media controls. Once the hyper-media controls have been located you can start working with link-rels independently of original media-type.

                Then you can add very specific link-rels, but any client that understands the underlying media-type will be able to "follow its nose", no matter how specific or generic the link-rels are - in the end they always represent a named link and nothing more. The name can be very specific but the link will always be generic.

                > - but if a media type is specific, it can only be consumed by specific agents that have been programmed for that task, so in how far are they following their nose?

                I assume that by "more specific media type" you think of media-types that express domain specific semantics like "this is a sales order/person/weather map/other". You don't need that for a client to "follow its nose" - all you need is a generic media-type with well defined hyper-media controls.

                With link-rels the server can show the client how to change its application state, by going from one resource to another. It does not matter how the client got those link relations - it could be from an extremely domain specific media-type or a very broad one.

                The important thing is that the server is in control and the client only "follows its nose" - as opposed to be programmed with a specific hard coded flow that assumes knowledge of all URLs involved in the steps.

                /Jørn
              Your message has been successfully submitted and would be delivered to recipients shortly.