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

3941Re: [rest-discuss] Simple URI Discovery Syntax (SUDS)

Expand Messages
  • Alex Jacobson
    Sep 4, 2003
    • 0 Attachment
      Seairth,

      Why not use IDL or WSDL? Why use HTTP methods?

      -Alex-


      ___________________________________________________________________
      S. Alexander Jacobson i2x Media
      1-212-787-1914 voice 1-603-288-1280 fax

      --On Monday, August 25, 2003 8:17 PM -0400 Seairth Jacobs
      <seairth@...> wrote:

      > Heh. I warned that it was a rough draft.... :)
      >
      > From: "Walden Mathews" <waldenm@...>
      >>
      >> 1. Does a remote application want to discover URIs, or does it want
      >> to discover resources?
      >
      > I agree that a remote application wants to discover resources. However,
      > in order to work with those resources, it must do so through URIs and
      > representations. The objective of SUDS to get ahold of the URI of a
      > resource, not the resource itself. I need to go reword all of that stuff.
      >
      >> 2. What is a "resource URI", as opposed to a regular URI?
      >
      > I didn't see "resource URI" in the document. Oh wait, that was in the
      > e-mail. In answer, there is no difference. It probably would have been
      > better to read as "resource's URI". After all, what you are after is the
      > URI, not the resource (that's what you use the aquired URI for).
      >
      >> 3. In practice, what would SUDS actually be used for? A focused
      >> scenario would help. In mean, isn't the web really about the discovery
      >> of resources, one within the context of another? And if that's the
      >> case, then where does this scheme fit in?
      >
      > I don't know if that's what the web is all about, but it certainly is a
      > part of the equation. However, the ability to do this effectively seems
      > fairly limited. For instance, for any given resource, how can one know
      > if it meets the needs of your client? How can a client know what a
      > resource can and cannot do (or what can be done to the resource)? If
      > there is a resource that provides a specific representation through a
      > given URI, how do you find that URI? It may be that the URI you
      > currently have for the resource returns HTML, and it may be that the html
      > document contains <link> elements to point to this same information.
      > However, this requires a client to be capable of parsing html and <link>
      > elements. But it may be that the URI you have returns another
      > content-type. It would then be necessary for the client to understand
      > that format to get the same information (assuming the information was
      > available). SUDS, on the other hand, provides clients to query this
      > information at the resource level instead of the representation level.
      >
      > As for a scenario, let's see... Suppose you have a blog entry at
      > http://www.example.com/sudsIsTheFuture. Now, here are the things you
      > could do with SUDS for that URI:
      >
      > 1) Discover which content-types are available (which your client also
      > understands).
      >
      > <suds>
      > <sud uri="">
      > <returns http-method="GET" content-type="text/xml"/>
      > </sud>
      > <sud uri="">
      > <returns http-method="GET" conent-type="application/atom+xml"/>
      > </sud>
      > <sud uri="">
      > <returns http-method="GET" content-type="application/pdf"/>
      > </sud>
      > </suds>
      >
      > returns
      >
      > <suds>
      > <sud uri="http://www.example.com/sudsIsTheFuture.rss2">
      > <returns http-method="GET" content-type="text/xml"/>
      > </sud>
      > <sud uri="http://www.example.com/sudsIsTheFuture.atom">
      > <returns http-method="GET" conent-type="application/atom+xml"/>
      > </sud>
      > <sud uri=""/>
      > </suds>
      >
      > 2) Discover where you can POST comments to.
      >
      > <suds>
      > <sud uri="">
      > <returns http-method="POST" conent-type="application/atom+xml"/>
      > </sud>
      > </suds>
      >
      > returns
      >
      > <suds>
      > <sud uri="http://www.example.com/sudsIsTheFuture.comments">
      > <returns http-method="POST" conent-type="application/atom+xml"/>
      > </sud>
      > </suds>
      >
      >
      > Another scenario... suppose robots.txt files and p3p were given a mime
      > type (or do they already have one?). In this case, a query like the
      > following could be submitted to http://www.example.com/:
      >
      > <suds>
      > <sud uri="">
      > <returns http-method="GET" conent-type="text/robots"/>
      > </sud>
      > <sud uri="">
      > <returns http-method="GET" conent-type="application/p3p+xml"/>
      > </sud>
      > <sud uri="">
      > <returns http-method="GET" conent-type="image/jpeg"/>
      > </sud>
      > </suds>
      >
      > which would return
      >
      > <suds>
      > <sud uri="http://www.example.com/policies/robots.txt">
      > <returns http-method="GET" conent-type="text/robots"/>
      > </sud>
      > <sud uri="http://www.example.com/policies/p3p.xml">
      > <returns http-method="GET" conent-type="application/p3p+xml"/>
      > </sud>
      > <sud uri="http://www.example.com/logo.jpg">
      > <returns http-method="GET" conent-type="image/jpeg"/>
      > </sud>
      > </suds>
      >
      > Yet another scenario... suppose you have a URI
      > (http://www.example.com/groups/rest-discuss) to a "container" resource.
      > You need to know what the client can and cannot do with/to the resource
      > via the given URI. So, you POST the following:
      >
      > <suds>
      > <sud uri="">
      > <accepts http-method="DELETE"/>
      > <accepts http-method="GET"/>
      > <accepts http-method="POST"/>
      > <accepts http-method="PUT"/>
      > <accepts content-encoding="gzip"/>
      > <accepts conent-type="text/html"/>
      > <accepts conent-type="text/xml"/>
      > </sud>
      > </suds>
      >
      > returns
      >
      > <suds>
      > <sud uri="http://www.example.com/groups/rest-discuss">
      > <accepts http-method="GET"/>
      > <accepts http-method="POST" conent-type="text/xml"/>
      > <accepts content-encoding="gzip"/>
      > <returns content-type="text/xml"/>
      > <returns content-type="application/pdf" content-encoding="gzip"/>
      > <returns content-type="text/xhtml+xml"/>
      > </sud>
      > </suds>
      >
      > (hmm... maybe this should be about interfaces, not URIs... Resource
      > Interface Discovery Syntax (RIDS)?)
      >
      >
      > I have another example using an extended SUDS document, which is connected
      > to my RNA stuff, but I'm not ready to show that one yet...
      >
      > So, how does any of this work for you?
      >
      > ---
      > Seairth Jacobs
      > seairth@...
      >
      >
      >
      > 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/
      >
      >
    • Show all 10 messages in this topic