User:Rcygania2/Fine-grained graph manipulation with HTTP

From Linked Data Platform
Jump to: navigation, search

The main facility that LDP provides for manipulating RDF data is the HTTP PUT verb. A resource description can be updated by doing a GET, doing modifications, and PUTting the result back. This works, but has some drawbacks:

  • For simple manipulations (e.g., changing a single literal), this implies a lot of overhead because a potentially large resource description has to be transmitted and analysed for changes
  • It does not provide a means of communicating constraints on the manipulation
  • There is potential for conflict when data is replaced.

LDP also supports HTTP PATCH as an optional feature. This somewhat addresses some of the drawbacks.

Here we make an argument that another approach could be taken to allow fine-grained (e.g., triple-level) manipulations with HTTP. The approach is to treat smaller parts (e.g., individual triples or individual property values) as first-class HTTP resources that can be manipulated with the usual HTTP verbs such as DELETE and PUT.

Coarse-grained HTTP manipulations are at the level of the whole resource. Manipulations are:

  1. Read a resource (GET)
  2. Remove a resource (DELETE)
  3. Update a resource (PUT) ?
  4. Append to a resource (POST) ?

Finer-grained HTTP manipulations operate at the triple level.

  1. Add a triple
  2. Create and add a triple
  3. Remove a triple
  4. Update the object of a triple (?)

@@@ work in progress