solid-spec icon indicating copy to clipboard operation
solid-spec copied to clipboard

api-websocket, nature of change and resource changed

Open scenaristeur opened this issue 4 years ago • 0 comments

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 ?

scenaristeur avatar Dec 11 '21 12:12 scenaristeur