Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dealing with non-matching DELETE+INSERT sparql-update #234

Closed
michielbdejong opened this issue Feb 12, 2021 · 2 comments
Closed

Dealing with non-matching DELETE+INSERT sparql-update #234

michielbdejong opened this issue Feb 12, 2021 · 2 comments

Comments

@michielbdejong
Copy link
Contributor

There is a "feature" of NSS which Solid OS relies on, which acts as a semaphore when updating a triple somewhere, using sparql-update. For instance if you change your name from Alice to Alicia, with a DELETE+INSERT sparql-update PATCH, but if your current name is not Alice, then the whole request fails. This makes it easier to write Solid apps, because it prevents the risk of ending up with two names if another app just changed your name from Alice to Bob already.

We discussed it at length a few years ago: https://github.com/solid/solid-spec/pull/193/files#diff-a86b670cc11fa633fa242a47094c359f4923ac41702b80b2bf70c05b03d3770aR368-R376

But I don't think that text ever landed in the current spec text, right? Do we still want to add it?

There is also a test for it in the test suite: https://github.com/solid/solid-crud-tests/blob/fc07be5/test/surface/update.test.ts#L276-L328

This test is currently passing for NSS and PSS, but failing for CSS.

@acoburn
Copy link
Member

acoburn commented Feb 12, 2021

HTTP already has a mechanism for avoiding the "lost update" problem: conditional requests via If-Match or If-Unmodified-Since. I'm not sure why a custom/specialized implementation of SPARQL 1.1 would be desirable for that.

@RubenVerborgh RubenVerborgh marked this as a duplicate of #139 Feb 12, 2021
@michielbdejong
Copy link
Contributor Author

Let's discuss there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants