W3C home > Mailing lists > Public > public-ldp-wg@w3.org > June 2013

Re: RDF Patch - Recording changes to an RDF Dataset

From: Andy Seaborne <andy@apache.org>
Date: Sun, 23 Jun 2013 19:20:56 +0100
Message-ID: <51C73C88.4090408@apache.org>
To: "Wilde, Erik" <Erik.Wilde@emc.com>
CC: "public-ldp-wg@w3.org" <public-ldp-wg@w3.org>
On 23/06/13 00:05, Wilde, Erik wrote:
> hello andy.
>
> generally speaking: great to see RDF Patch being tackled! time to use this
> PATCH method. if it is solved well, it should be an awesome way to keep
> collections in sync, for example.
>
> one thing worries me a bit:
>
> On 2013-06-22 06:23 , "Andy Seaborne" <andy@apache.org> wrote:
>> The RDF Patch format is reasonably easy to implement - the additional
>> work given access to the lexer from a Turtle parser is not great.  It's
>> CSV-like.
>
> is there really no way how this can be based on RDF itself? JSON Patch
> (http://tools.ietf.org/html/rfc6902) and XML Patch
> (http://tools.ietf.org/html/draft-wilde-xml-patch) are using their own
> metamodels, and i think that makes it as easy as possible to produce and
> consume them. i would assume the same might be true for RDF's patch model.

There have been proposals around for a while (see [1] for a overview) to 
encode in RDF.  You could encode the structural changes into RDF but 
there are consequences as

[[
1/ Handling of blank nodes
2/ Whole document requirements
]]

You could use parts of SPARQL Update (c.f. use of Xpath) - that is 
closer to the navigation/pattern language style.  RDF Patch is based on 
experience of working at scale where a stream has advantages (and 
disadvantages).  RDF in concrete syntax isn't ordered.

JSON patch - it is actually quite similar in style.  There is an 
operation, a path and optionally value.  XML patch is of the same style 
- more complicated because the XML data model is more complicated.  Both 
use another language to describe the place in the document.  The use of 
xpath expressions means it isn't just XML; same for JSON paths on a 
smaller scale.

RDF patch is similar to an N-Quads file with an operation field added. 
It also applies to a collection of RDF graphs.

	Andy

[1] http://www.w3.org/2009/12/rdf-ws/papers/ws07

>
> cheers,
>
> dret.
>
Received on Sunday, 23 June 2013 18:21:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:11:51 UTC