solid / notifications

Solid Notifications Technical Reports
https://solid.github.io/notifications/protocol
MIT License
11 stars 7 forks source link

Clarify you can watch a WebSocket for a resource to be created #5

Open timbl opened 4 years ago

timbl commented 4 years ago

In the bit about live update,

https://github.com/solid/solid-spec/blob/master/api-websockets.md

we need to specify that you can subscribe to changes in a resource which currently does not exist, and get a ping when it is created (and thereafter to any changes).

The headers Update-via and `MS-Author-Via: are sent on 404 as well as 200.

NSS sends the headers now. i haven't tested the actual WS ping message on file creation.

See also

https://github.com/linkeddata/rdflib.js/issues/392 in rdflib

which is depended on by

https://github.com/solid/solid-ui/issues/228 a issue with the chat UI needing this.

timbl commented 4 years ago

See also https://github.com/solid/test-suite/issues/89

CxRes commented 4 years ago

NSS sends an ack on a non-existant resource when you subscribe to it but does not send a pub on creation. It sends a pub when you delete this resource thereafter.

IMHO the current spec is painful in the sense that the way to determine a new resource (say, created by someone else) when subscribing to a container would be to read its contents again and diff it against the previous contents. This puts unnecessary burden for client to track contents (such as in my use case for a recursive watcher) and extra fetch (in case one is interested in notification only) without any benefit to the server. Even something simple like emitting the HTTP verbs and the slug value, which requires almost no extra burden on the part of the server, would allow for simpler client designs.

csarven commented 4 years ago

I've transferred this issue from https://github.com/solid/solid-spec/issues/217 .

Noting that there is also https://github.com/solid/solid-spec/issues/216 which seems to be duplicate of this issue - the only difference is the issue title. Leaving solid-spec's 216 as is for now but ongoing work here should take existing comments in that issue.