Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

Lightweight semaphore mechanism #3

Open
kjetilk opened this issue Jan 17, 2020 · 4 comments
Open

Lightweight semaphore mechanism #3

kjetilk opened this issue Jan 17, 2020 · 4 comments
Labels
HTTP PATCH body SPARQL UPDATE query used as body of HTTP PATCH request

Comments

@kjetilk
Copy link

kjetilk commented Jan 17, 2020

@timbl suggested in his RWW Design Issue that DELETE INSERT WHERE queries could be used for a semaphore mechanism, so that if the DELETE part fails, a conflict flag should be raised.

I think the mechanism can be illustrated with simpler DELETE DATA/INSERT DATA queries, so here's my description:

Say that client 1 goes:

DELETE DATA { <foo> <baz> "Dahut" } ;
INSERT DATA { <foo> <baz> "Bar" }

independently, client 2 goes

DELETE DATA { <foo> <baz> "Dahut" } ;
INSERT DATA { <foo> <baz> "Foobar" }

before the first client as finished. In that case, the Solid implementation
would return a 409 Conflict to the second client.

There are a few problems, as noted in solid/solid-spec#193 it is a willful violation of the SPARQL 1.1 specification, which says:

Deleting triples that are not present, or from a graph that is not present will have no effect and will result in success.

Moreover, reporting a success or failure status to DELETE queries are problematic from a confidentiality perspective, as is the topic of #2 .

@kjetilk
Copy link
Author

kjetilk commented Jan 17, 2020

My proposal to fix both this problem and the problem in #2 is to keep the current SPARQL 1.1 behaviour, but design a new reporting mechanism, so that the status report becomes optional, and thus can separately be subjected to acl:Read requirement.

I have posted the strawman proposal that details this to the SPARQL-1.2 CG in
https://lists.w3.org/Archives/Public/public-sparql-12/2020Jan/0000.html

@kjetilk
Copy link
Author

kjetilk commented Jan 17, 2020

Also note that I had an earlier discussion on this in the SPARQL-1.2 CG in w3c/sparql-dev#60

@RubenVerborgh RubenVerborgh added the HTTP PATCH body SPARQL UPDATE query used as body of HTTP PATCH request label Jan 17, 2020
@RubenVerborgh
Copy link

the current SPARQL 1.1 behaviour

Specifically, you want to keep the SPARQL UPDATE 1.1. semantics in the context of HTTP PATCH (as opposed to the current NSS semantics)?

@kjetilk
Copy link
Author

kjetilk commented Jan 17, 2020

Yes, I think we need to do that to solve #2 . Also because it is nice to not break specs :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
HTTP PATCH body SPARQL UPDATE query used as body of HTTP PATCH request
Projects
None yet
Development

No branches or pull requests

2 participants