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

Update Delta Feature #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update Delta Feature #61

wants to merge 1 commit into from

Conversation

jaxoncreed
Copy link
Contributor

This is a proposal for including the changes made (delta) in the notification.

Copy link
Member

@elf-pavlik elf-pavlik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it serves as an interesting direction to explore.

I think we should still consider another option in parallel, for example, reusing Modifying Resources Using N3 Patches

As always with RDF and deltas, Blank Nodes will start biting sooner or later. We may want to recommend that storage which uses deltas should skolemize all the blank nodes in stored resources. Yet another reason to coordinate any work related to deltas and patches. Regarding skolemizing blank nodes we could ask for feedback from https://lodlaundromat.org/

@jaxoncreed
Copy link
Contributor Author

jaxoncreed commented Apr 7, 2022

Look into RDF Delta. https://afs.github.io/rdf-delta/

@elf-pavlik
Copy link
Member

elf-pavlik commented Feb 16, 2023

@joachimvh do you have some suggestions based on how you see implementing it in CSS? We only look at RDFSources here and including the delta in the notification message.

As I mention in my previous comment diffing RDF always comes with the nuance of labeling blank nodes and preferably we will be able to reuse an existing strategy to deal with it.

I think if the resource was updated with HTTP PATCH the same patch could be considered a delta, for updates with HTTP PUT the storage server would need to calculate the diff.

@joachimvh
Copy link
Contributor

@joachimvh do you have some suggestions based on how you see implementing it in CSS?

Skolemizing blank nodes seems drastic as you are modifying the user's data. If someone didn't want their deltas to include blank nodes it's up to them to not put blank nodes in their data. Or a server could reject RDF data containing blank nodes if you really wanted to prevent them.

Actually calculating and emitting deltas in CSS would probably not be trivial. In the case of a PUT the data gets replaced directly without the server looking at the actual data. In the case of a PATCH this is internally done by doing a read followed by a write, and the same event gets emitted as in the case of a PUT.

Copy link
Member

@elf-pavlik elf-pavlik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't have PR left hanging. We can mark it as 0.1 and merge it. This should signal that this feature could possibly completely change. At least we will have a draft to iterate on.

When an RDF resource is updated on a storage server, a notification is sent to a subscribing client, but this notification does not tell the client how the resource was updated. As a result, the client must make another request to the storage server to retieve the document and reconcile its updates. Update Delta is a notifications feature that tells the client change, or delta between the document pre-update and post-update in the notification activity.

## 2. Status of the Document
TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TODO
**Version: 0.1**

Copy link
Contributor

@TallTed TallTed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor fixes

# Update Delta

## 1. Abstract
When an RDF resource is updated on a storage server, a notification is sent to a subscribing client, but this notification does not tell the client how the resource was updated. As a result, the client must make another request to the storage server to retieve the document and reconcile its updates. Update Delta is a notifications feature that tells the client change, or delta between the document pre-update and post-update in the notification activity.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When an RDF resource is updated on a storage server, a notification is sent to a subscribing client, but this notification does not tell the client how the resource was updated. As a result, the client must make another request to the storage server to retieve the document and reconcile its updates. Update Delta is a notifications feature that tells the client change, or delta between the document pre-update and post-update in the notification activity.
When an RDF resource is updated on a storage server, a notification is sent to a subscribing client, but this notification does not tell the client how the resource was updated. As a result, the client must make another request to the storage server to retieve the document and reconcile its updates. Update Delta is a notifications feature that tells the client the change, or delta, between the document pre-update and post-update in the notification activity.

TODO

## 3. Notification Feature
Update Delta is a notification feature. As such, any compliant storage server MUST list it among other features during the notification discover phase as the URL `http://www.w3.org/ns/solid/notifications#updateDelta`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Update Delta is a notification feature. As such, any compliant storage server MUST list it among other features during the notification discover phase as the URL `http://www.w3.org/ns/solid/notifications#updateDelta`.
Update Delta is a notification feature. As such, any compliant storage server MUST list it among other features during the notification discovery phase as the URL `http://www.w3.org/ns/solid/notifications#updateDelta`.

@elf-pavlik
Copy link
Member

During a recent call, we discussed it shortly again and were converging in a direction of using the same patch format which is being used for patching resources.
I think we might encounter some challenges when it comes to content type. While the patch might be using text/n3 or application/sparql-update I don't see how it would be included in a notification using application/ld+json or text/turtle. Possibly this feature might be only available for `text/n3 with N3 Patch.

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

Successfully merging this pull request may close these issues.

4 participants