Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

api-websocket, nature of change and resource changed #236

Open
scenaristeur opened this issue Dec 11, 2021 · 0 comments
Open

api-websocket, nature of change and resource changed #236

scenaristeur opened this issue Dec 11, 2021 · 0 comments

Comments

@scenaristeur
Copy link

scenaristeur commented Dec 11, 2021

according to the api-websocket
https://github.com/solid/solid-spec/blob/master/api-websockets.md, we can now subscribe to containers .

it would be nice if we could get the nature of the change (POST, PUT, PATCH, DELETE) and the resource changed, for example, when a new file is added :

pub https://example.org/data/ POST https://example.org/data/the_new_file.txt

or when it is modified

pub https://example.org/data/ PATCH https://example.org/data/the_new_file.txt

otherwise, we only know that there is a change in the folder https://example.org/data/ and we don't know which change, so we have to retrieve all resources and, fetch them all, to look which one have change
or perhaps better, something like ESS notification :

   "@context":[
      "https://www.w3.org/ns/activitystreams",
      {
         "state":{
            "@id":"http://www.w3.org/2011/http-headers#etag"
         }
      }
   ],
   "id":"urn:uuid:<uuid>",
   "type":[
      "http://www.w3.org/ns/prov#Activity",
      "Update"
   ],
   "actor":[
      "<WebID>"
   ],
   "object":{
      "id":"https://pod.inrupt.com/<user>/some-container/",
      "type":[
         "http://www.w3.org/ns/ldp#BasicContainer",
         "http://www.w3.org/ns/ldp#Container",
         "http://www.w3.org/ns/ldp#RDFSource",
         "http://www.w3.org/ns/ldp#Resource"
      ]
   },
   "published":"2021-03-30T01:01:49.550044Z"
}

When a new folder is inside https://example.org/data/ and change are made in that folder, notification are not send should we re-subscribe to https://example.org/data/ .
Does this new subscription replace the first one or does it cumul subscribtion on the server ?

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

No branches or pull requests

1 participant