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

Service discovery

Expand Messages
  • Jakob Strauch
    It is often stated, that a client just have to know one starting URI to get what the service has to offer. Still, is there some common way (or media type) to
    Message 1 of 12 , May 11, 2011
    • 0 Attachment
      It is often stated, that a client just have to know one starting URI to get what the service has to offer.

      Still, is there some common way (or media type) to do this? Is WADL a bad idea (some are stating, WADL is "unRESTful")?

      Or just use a bunch of links?

      Regards,
      Jakob
    • algermissen1971
       Jakob ... Right, one of many possible entry points. Every URI that makes sense to you to bookmark makes for a fine entry point. ... What do you mean? If
      Message 2 of 12 , May 11, 2011
      • 0 Attachment
        Jakob

        On 11 May, 2011,at 01:56 PM, Jakob Strauch <jakob.strauch@...> wrote:

        It is often stated, that a client just have to know one starting URI to get what the service has to offer.
         
        Right, one of many possible entry points. Every URI that makes sense to you to bookmark makes for a fine entry point.


        Still, is there some common way (or media type) to do this?
         
        What do you mean? If your user agent understands the media types offered by the server the user agent will be able to proceed through the application it intends. There is no need for any special media type.

        However, you surely must know what service you want to interact with to configure the application (meaning: select the appropriate entry URI. If your intention is to buy a book, http://www.bahn.de is probably a bad choice.

        Note that this selection is not based on any technical service description but on knowledge about the nature of the service. This is what often confuses people because they equate the description of the service kind/nature (e.g. a Blog server) with its API description. Both are completely orthogonal issues - it is just that RPC-style connectors (e.g. WS-*) tend to cause the impression that they are one and the same.

        Thus, simply determine where to point your user agent at and then let HTTP figure out the rest. There is no need whatsoever for service description in the sense of API descriptions.


        Is WADL a bad idea (some are stating, WADL is "unRESTful")?
         
        Sure - it tells the client more than it should know. WADL causes just the coupling you actually want to eliminate when you are using REST.


        Or just use a bunch of links?
         
        Bingo :-)

        Jan


        Regards,
        Jakob



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

        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/


      • algermissen1971
        ... You might be interested in how to use DNS for discovery: http://www.infoq.com/articles/rest-discovery-dns Jan  ... On 11 May, 2011,at 01:56 PM, Jakob
        Message 3 of 12 , May 11, 2011
        • 0 Attachment


          On 11 May, 2011,at 01:56 PM, Jakob Strauch <jakob.strauch@...> wrote:

          It is often stated, that a client just have to know one starting URI to get what the service has to offer.

          Still, is there some common way (or media type) to do this?
           
          You might be interested in how to use DNS for discovery:

          http://www.infoq.com/articles/rest-discovery-dns

          Jan





          Is WADL a bad idea (some are stating, WADL is "unRESTful")?

          Or just use a bunch of links?

          Regards,
          Jakob



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

          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/

        • Alessandro Nadalin
          Hi Jakob, ... The hypermedia tenet states that the should should have no prior knowledge about the whole structure of the service. So, yes, you should feed
          Message 4 of 12 , May 11, 2011
          • 0 Attachment
            Hi Jakob,

            On Wed, May 11, 2011 at 1:56 PM, Jakob Strauch <jakob.strauch@...> wrote:
             

            It is often stated, that a client just have to know one starting URI to get what the service has to offer.

            Still, is there some common way (or media type) to do this? Is WADL a bad idea (some are stating, WADL is "unRESTful")?

            Or just use a bunch of links?


            The hypermedia tenet states that the should should have no prior knowledge about the whole structure of the service.

            So, yes, you should feed your consumers with semantic ( rel="payment", for example ) hypermedia controls.
             


            Regards,
            Jakob




            --
            Nadalin Alessandro
            www.odino.org
            www.twitter.com/_odino_

          • Jakob Strauch
            Ok, i understand that (i think ;-) ). But would a Mediatype for just a bunch of links not be useful? Even it would result in a simplictic media type? Right
            Message 5 of 12 , May 11, 2011
            • 0 Attachment
              Ok, i understand that (i think ;-) ). But would a Mediatype for "just a bunch of links" not be useful? Even it would result in a simplictic media type?

              Right now, i´m able to define the links like:

              <links>
              <link rel="payment" .../>
              <link rel="otherstuff" .../>
              ...
              </links>

              or like:

              <service>
              <toplevelressources>
              <link rel="payment" .../>
              <link rel="otherstuff" .../>
              ...
              </toplevelressources>
              </service>

              or whatever...

              Sure, you have to tell your clients, what media types your offering (domain-specific). But do i have to tell the clients (of maybe different applications/domains) how to interpret the uri lists above?




              --- In rest-discuss@yahoogroups.com, Alessandro Nadalin <alessandro.nadalin@...> wrote:
              >
              > Hi Jakob,
              >
              > On Wed, May 11, 2011 at 1:56 PM, Jakob Strauch <jakob.strauch@...> wrote:
              >
              > >
              > >
              > > It is often stated, that a client just have to know one starting URI to get
              > > what the service has to offer.
              > >
              > > Still, is there some common way (or media type) to do this? Is WADL a bad
              > > idea (some are stating, WADL is "unRESTful")?
              > >
              > > Or just use a bunch of links?
              > >
              >
              > The hypermedia tenet states that the should should have no prior knowledge
              > about the whole structure of the service.
              >
              > So, yes, you should feed your consumers with semantic ( rel="payment", for
              > example ) hypermedia controls.
              >
              >
              > >
              > > Regards,
              > > Jakob
              > >
              > >
              > >
              >
              >
              >
              > --
              > Nadalin Alessandro
              > www.odino.org
              > www.twitter.com/_odino_
              >
            • Alessandro Nadalin
              ... Atom seems good for you ;-) http://www.ietf.org/rfc/rfc4287.txt ... -- Nadalin Alessandro www.odino.org www.twitter.com/_odino_ On Wed, May 11, 2011 at
              Message 6 of 12 , May 11, 2011
              • 0 Attachment
                On Wed, May 11, 2011 at 2:55 PM, Jakob Strauch <jakob.strauch@...> wrote:
                 

                Ok, i understand that (i think ;-) ). But would a Mediatype for "just a bunch of links" not be useful? Even it would result in a simplictic media type?


                Atom seems good for you ;-)

                 


                Right now, i´m able to define the links like:

                <links>
                <link rel="payment" .../>
                <link rel="otherstuff" .../>
                ...
                </links>

                or like:

                <service>
                <toplevelressources>
                <link rel="payment" .../>
                <link rel="otherstuff" .../>
                ...
                </toplevelressources>
                </service>

                or whatever...

                Sure, you have to tell your clients, what media types your offering (domain-specific). But do i have to tell the clients (of maybe different applications/domains) how to interpret the uri lists above?


                --- In rest-discuss@yahoogroups.com, Alessandro Nadalin <alessandro.nadalin@...> wrote:
                >
                > Hi Jakob,
                >
                > On Wed, May 11, 2011 at 1:56 PM, Jakob Strauch <jakob.strauch@...> wrote:
                >
                > >
                > >
                > > It is often stated, that a client just have to know one starting URI to get
                > > what the service has to offer.
                > >
                > > Still, is there some common way (or media type) to do this? Is WADL a bad
                > > idea (some are stating, WADL is "unRESTful")?
                > >
                > > Or just use a bunch of links?
                > >
                >
                > The hypermedia tenet states that the should should have no prior knowledge
                > about the whole structure of the service.
                >
                > So, yes, you should feed your consumers with semantic ( rel="payment", for
                > example ) hypermedia controls.
                >
                >
                > >
                > > Regards,
                > > Jakob
                > >
                > >
                > >
                >
                >
                >
                > --
                > Nadalin Alessandro
                > www.odino.org
                > www.twitter.com/_odino_
                >




                --
                Nadalin Alessandro
                www.odino.org
                www.twitter.com/_odino_

              • Reza Lesmana
                Yes, you should tell the clients how to interpret the rest service. Just look at the Google API documentation, most of Google API is a REST service. It might
                Message 7 of 12 , May 11, 2011
                • 0 Attachment
                  Yes, you should tell the clients how to interpret the rest service.

                  Just look at the Google API documentation, most of Google API is a REST service. It might give you a clue on how to use a documentation to tell the clients how to access your REST service.

                  On Wed, May 11, 2011 at 7:55 PM, Jakob Strauch <jakob.strauch@...> wrote:


                  Sure, you have to tell your clients, what media types your offering (domain-specific). But do i have to tell the clients (of maybe different applications/domains) how to interpret the uri lists above? 

                • Jan Algermissen
                  ... Yes, the media type tells them. That *is* the contract between client and server. Link relation definitions, while not a media type, are conceptually
                  Message 8 of 12 , May 11, 2011
                  • 0 Attachment
                    On May 11, 2011, at 2:55 PM, Jakob Strauch wrote:

                    > But do i have to tell the clients (of maybe different applications/domains) how to interpret the uri lists above?

                    Yes, the media type tells them. That *is* the contract between client and server.

                    Link relation definitions, while not a media type, are conceptually similar. If the client understands them (IOW has been programmed to understand them) the client can meaningfully react on those links. Otherwise they are just links (which is not at all bad for something like a crawler).

                    Jan
                  • Jan Algermissen
                    ... Strictly speaking not, because Google APIs do not use specific global media types - Google owns the contract. However, its close given the ubiquitousness
                    Message 9 of 12 , May 11, 2011
                    • 0 Attachment
                      On May 11, 2011, at 3:18 PM, Reza Lesmana wrote:

                      >
                      >
                      > Yes, you should tell the clients how to interpret the rest service.
                      >
                      > Just look at the Google API documentation, most of Google API is a REST service.

                      Strictly speaking not, because Google APIs do not use specific global media types - Google owns the contract.

                      However, its close given the ubiquitousness and relative 'friendly behavior' of Google.

                      Jan


                      > It might give you a clue on how to use a documentation to tell the clients how to access your REST service.
                      >
                      > On Wed, May 11, 2011 at 7:55 PM, Jakob Strauch <jakob.strauch@...> wrote:
                      >
                      > Sure, you have to tell your clients, what media types your offering (domain-specific). But do i have to tell the clients (of maybe different applications/domains) how to interpret the uri lists above?
                      >
                      >
                      >
                      >
                    • Jakob Strauch
                      ... Look for XRDS and XRD (http://www.oasis-open.org/committees/download.php/32686/xrd-1.0-wd01.html) HTML is also pretty good (a list of anchors with
                      Message 10 of 12 , May 11, 2011
                      • 0 Attachment
                        Yes i know, that the media type one part of a contract is. Someone send me a private reply, which addresses what i meant:

                        ----
                        Look for XRDS and XRD (http://www.oasis-open.org/committees/download.php/32686/xrd-1.0-wd01.html)

                        HTML is also pretty good (a list of anchors with "rel=..." attributes).

                        Maybe also LRDD (http://tools.ietf.org/html/draft-hammer-discovery-06)
                        -----

                        I think i would use conneg here to provide a human readable version with simple HTML anchors and also, for instance, a XRD for describing the links to my ressources. But HTML has bad support for URI Templates and XRD seems to be a working draft for 2 years...


                        --- In rest-discuss@yahoogroups.com, Jan Algermissen <algermissen1971@...> wrote:
                        >
                        >
                        > On May 11, 2011, at 2:55 PM, Jakob Strauch wrote:
                        >
                        > > But do i have to tell the clients (of maybe different applications/domains) how to interpret the uri lists above?
                        >
                        > Yes, the media type tells them. That *is* the contract between client and server.
                        >
                        > Link relation definitions, while not a media type, are conceptually similar. If the client understands them (IOW has been programmed to understand them) the client can meaningfully react on those links. Otherwise they are just links (which is not at all bad for something like a crawler).
                        >
                        > Jan
                        >
                      • Jan Algermissen
                        ... Why don t you just define a media type that covers the semantics your intended applications need? Why do you need a description format *and* then specify
                        Message 11 of 12 , May 11, 2011
                        • 0 Attachment
                          On May 11, 2011, at 6:08 PM, Jakob Strauch wrote:

                          > Yes i know, that the media type one part of a contract is. Someone send me a private reply, which addresses what i meant:
                          >
                          > ----
                          > Look for XRDS and XRD (http://www.oasis-open.org/committees/download.php/32686/xrd-1.0-wd01.html)
                          >
                          > HTML is also pretty good (a list of anchors with "rel=..." attributes).
                          >
                          > Maybe also LRDD (http://tools.ietf.org/html/draft-hammer-discovery-06)
                          > -----
                          >
                          > I think i would use conneg here to provide a human readable version with simple HTML anchors and also, for instance, a XRD for describing the links to my ressources. But HTML has bad support for URI Templates and XRD seems to be a working draft for 2 years...


                          Why don't you just define a media type that covers the semantics your intended applications need?

                          Why do you need a description format *and* then specify your specific semantics in addition to that?

                          Jan



                          >
                          >
                          > --- In rest-discuss@yahoogroups.com, Jan Algermissen <algermissen1971@...> wrote:
                          >>
                          >>
                          >> On May 11, 2011, at 2:55 PM, Jakob Strauch wrote:
                          >>
                          >>> But do i have to tell the clients (of maybe different applications/domains) how to interpret the uri lists above?
                          >>
                          >> Yes, the media type tells them. That *is* the contract between client and server.
                          >>
                          >> Link relation definitions, while not a media type, are conceptually similar. If the client understands them (IOW has been programmed to understand them) the client can meaningfully react on those links. Otherwise they are just links (which is not at all bad for something like a crawler).
                          >>
                          >> Jan
                          >>
                          >
                          >
                          >
                          >
                          > ------------------------------------
                          >
                          > Yahoo! Groups Links
                          >
                          >
                          >
                        • Solomon Duskis
                          ... Then maybe URI templates are a bad idea... maybe we should stick with s? -Solomon
                          Message 12 of 12 , May 12, 2011
                          • 0 Attachment
                            <snip>
                             But HTML has bad support for URI Templates and XRD seems to be a working draft for 2 years...

                            Then maybe URI templates are a bad idea... maybe we should stick with <form>s?

                            -Solomon
                          Your message has been successfully submitted and would be delivered to recipients shortly.