W3C home > Mailing lists > Public > public-awwsw@w3.org > November 2009

Re: ideas: the REST of HTTP & the SPARQL of GET

From: Jonathan Rees <jar@creativecommons.org>
Date: Tue, 17 Nov 2009 10:48:28 -0500
Message-ID: <760bcb2a0911170748w74878dc0ofb8c71b758cc9931@mail.gmail.com>
To: Michael Hausenblas <michael.hausenblas@deri.org>
Cc: AWWSW TF <public-awwsw@w3.org>
On Tue, Nov 10, 2009 at 4:28 AM, Michael Hausenblas
<michael.hausenblas@deri.org> wrote:
>> My other recent idea:
>>
>> We are suggesting that some response messages can be translated into
>> RDF. In the same way we should be able to say that a request message
>> (such as a GET) can be translated into SPARQL, or something very close
>> to it.
>
> Good idea! Please note that we have recently discussed this in: 'RESTful
> SPARQL? You Name It! Aligning SPARQL with REST and Resource Orientation' [1]


I looked at this, and it seems unrelated to what I have in mind. Let
me elaborate.  Consider a client and server that can only communicate
using a SPARQL API (i.e. submit a query and get back a result).  Now
suppose the client wants to do an HTTP request. It has to map the HTTP
request it has in mind into a SPARQL query, send that to the server,
which then has to find the information requested and assemble that
into a SPARQL response. The client then processes that SPARQL response
and learns from it what it wanted to know.

For example, one might have

select content, content_type, content_language, expires
from <http://myfavoritesparqlendpoint.org/>
where {
  [ a ht:Correspondence;
    ht:ofResource <http://requested-resource>;
    ht:holdsUntil ?expires;
    ht:toRepresentation
      [ ht:hasContent  ?content;
        ht:hasContentType [ rdfs:label ?content_type];
        ht:hasContentLanguage [ rdfs:label ?content_language]. ]
}

This sort of turns the whole problem on its head. Instead of talking
about translating HTTP messages, one asks what one wants to know about
the resource (that the HTTP protocol might tell you), and how that
knowledge is to be communicated in RDF.

I'm typing fast here, but I hope you get the idea.

Jonathan
Received on Tuesday, 17 November 2009 15:49:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 17 November 2009 15:49:04 GMT