-
Notifications
You must be signed in to change notification settings - Fork 19
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
Relaxation of transaction requirements #60
Comments
As http clients, wouldn’t they already need to detect errors such as this? |
Yes, they would, but they wouldn't necessarily know what to do with them? |
It could be useful to describe some of the cases like 409 that arise and when they are appropriate. That sounds like it could be in a "best practice guide" (and using conditional requests and ...) because it is explaining how HTTP applies and then isn't tied to an WG/spec cycle. |
to do this would be to conflate protocol and application logic. |
Yes, it most certainly is. However, not all implementations are necessarily willing or able to manage the metadata in the store to allow for this, and the suggestion amounts to not requiring them too, but still have a fallback mechanism that can be used in lieu of such a system. |
what is the intended outcome if a sequence of intervening operations causes the store to return back to a state which conceals any pertinent change? |
And what happens if concurrent write requests are submitted to the server? Either SPARQL updates or Graph Store Protocol |
SPARQL 1.0 did not consider transaction isolation nor other ACID elements at all; SPARQL 1.1 gives these only minimal consideration or mention (e.g., silent success for DELETE operations that may have multiple reasons for having no effect). LDP didn't do much better (though I and some others tried). You have to reach back to SQL and ODBC/JDBC/ADO.NET/OLE DB for full consideration. |
Why?
SPARQL 1.1 Update discusses atomicity, and also notes that "Deleting triples that are not present, or from a graph that is not present will have no effect and will result in success."
The Solid project has encountered a problem around this in the case where isolation could not be maintained.
My interpretation of this is the following (based in part on the discussion within the Solid project but also with @afs ): Consider the case where two concurrent users do a DELETE-INSERT operation, then if the endpoint does not maintain isolation, the success status will not be helpful in determining if isolation was breached. Thus, for this use case, it seems to be an expectation that atomicity and isolation is maintained.
It is not necessarily a requirement everyone should meet (though, I personally prefer to use conditional requests).
I think we should discuss relaxing this requirement, and instead communicate a conflict.
Previous work
@timbl has a Design Issue where he strongly advocates that a
409 Conflict
should be sent at the protocol level in this case.Proposed solution
Add a "conflict" operation result to SPARQL Update, that SPARQL implementations that does not maintain ACID can/should/must use to indicate conflict.
Add
409 Conflict
to the SPARQL Protocol to be used whenever the underlying implementation indicates a conflict.Considerations for backward compatibility
For services currently supporting ACID, there should be no changes. Clients that have previously relied on that the servers supports ACID, will need to add logic to support conflicts, including detecting 409, update and reschedule their writes.
The text was updated successfully, but these errors were encountered: