W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2010

SPARQL protocol

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Thu, 04 Nov 2010 12:54:48 +0000
Message-ID: <4CD2AD18.1060005@epimorphics.com>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
The SPARQL 1.0 Protocol is defined in WSDL.  A query can be sent as 
?query= using GET or the POST equivalent using content type 
application/x-www-form-urlencoded, where the query= can end up in the 
body of the request.

We need to define how to send SPARQL 1.1 Update requests over HTTP.  Use 
of application/x-www-form-urlencoded is problematic because the body is 
the bytes for a form-encoded HTTP request.  This makes it harder to 
process at scale by making streaming harder; some systems will consume 
and parse the entire form body before letting the service access the 
HTTP form, resulting in a in-memory copy.

SPARQL Update requests have the potential to be very large e.g.

   ... lots and lots of triples ...

is the way to do inline upload of data.

Directly using HTTP< not via HTML forms, would be better: POST (and 
PATCH) with content-type application/sparql-update, and the request 
directly in the body (POST can still have a query string so it does not 
preclude additional arguments).

But we still may want to define use from an HTML form as well for
It needs the parameter name defined - suggestion "request=" so (1) can 
tell query from update simply and (2) it's a request, not a query.


1/ SPARQL 1.1 Update requests are transmitted by POST (or PATCH) with 
content type "application/sparql-update".  Responses are 200, 400 and 
others as appropriate.

2/ We also describe (non-normative) use with HTML forms with parameter 

3/ For consistency:
    We also register a MIME type for SPARQL queries 
"application/sparql-query". This is not absolutely necessary but
    it has the useful effect of registering ".rq" for the file extension.
    it can be used when serving SPARQL queries in response to a GET.

Received on Thursday, 4 November 2010 12:55:25 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:02 UTC