-
Notifications
You must be signed in to change notification settings - Fork 121
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
Implement notification information in the Description Resource #1608
Comments
Could someone with admin access assign me to this feature? I plan to work on it unless there are people already working on it. |
Based on text from #1572
I think is up to the server to decide if they provide information in storage description, description resource or both. |
The notification spec does not require discovery through the specific description resources. It just states that if servers want to allow discovery through those which triples need to be present. For the CSS implementation I decided to use the alternative option of allowing discovery through the storage description resource instead, as we needed to add that one anyway for the 0.10 version of the Solid protocol spec. I'm not against adding the other option as well but the reason it was not done yet is because there currently isn't a generic system in place in CSS to add dynamic metadata to resources. This would have to be added first, so it could then be used to dynamically add the notification discovery metadata. Probably through some sort of wrapping As was mentioned in the linked issue, there is no JSON-LD framing. For description resources this would be even more complicated than just for the notification-specific resources I think, as there are several specifications that have opinions on what should be in a description resource. But even for those specifically of the notification specification there are no such requirements, so to be safe all responses of the related APIs should be interpreted as RDF and not as a JSON document with specific fields. |
To be clear, the Solid Notifications Protocol is not claiming the entirety of Description Resource. It is merely describing the data model that's used as part of a Description Resource (or a Storage Description Resource) to advertise Subscription Services and Notification Channels. Description Resource and Storage Description Resource are not merely interchangeable either. The purpose of the former is resource-specific whereas the latter is intended for all resources in a storage. Granted that the Storage Description Resource could technically describe specific Subscription Services/ and Notification Channels available to each of the resources in a storage - again, possible, but not a good idea for obvious reasons - and Discovery Clients could even discover a topic resource of interest, but none of that is required for conformance with respect to Storage Description Resource. Moreover, the intended discovery of Subscription Services and Notification Channels for a topic resource is the associated Description Resource. So again, if CSS wants to use the same Subscription Service and Notification Channel for all resources in a storage, Storage Description Resource is indeed the way to go. Discovery Clients will indeed use Storage Description Resource for that purpose. |
IMO storage description is perfectly fine for the discovery of Subscription Services. |
Okay, this makes sense. So, is a discovery client supposed to fetch both the storage description and the resource description? What if they both have notification information? Is there one that should be favored over the other? |
Given that CSS currently only implements storage description, I would start with trying that and if not successful only then try the Description Resource. For sendTo based channel types (like Webhook), which always look for a Subscription Service, the storage description-based discovery (if available) should always be sufficient. EDIT: Let's be careful not to use this issue in the CSS repo for discussions that would be better served in the notifications spec repo or in a client lib repo. |
Hey, sorry again. I'm having a hard time finding where the subscription/notification information is under the storage resource. Here's what I've tried: The notifications spec says:
I can't find a request that yields a Here are some the requests I've tried:
So, I moved up the URI path hierarchy as described in the Solid Protocol (https://solidproject.org/TR/protocol#storage-resource) until I found the storage resource
Maybe I'm missing something. Could you provide the requests I should make to discover the notifications/subscription information? Note: Yeah, I'll open a spec issue next time to discuss off topic things. |
Which version of the server are you testing this on? As this was only added in the v6 branch (which the notification PR is also targeting). I just tested it out myself and got the expected header:
Every resource that you send a HEAD/GET request to should give you that result, even if the resource itself is not a storage. |
https://solidproject.org/TR/2022/protocol-20221231#server-storage-description Aside: Interesting that CSS is still using the unregistered scheme |
Having read your reply makes me realize that I probably misinterpreted that part of the specification. I read it as the "storage description resource" being a specific type of resource that contains the necessary information, which is separate from the description resource of the storage. But I see now that those should be the same thing 😅. Will have to look into how to merge those as that does change things a bit. Might have to implement the idea I suggested initially on this issue anyway to be able to do this. |
Right. I've realised that storage description resource and the description resource of the storage resource could be different but practically can be the same resource when I implemented 1) the server requirement (experimental in NSS) and 2) application making use of it (dokieli). I've shared some of those findings in solid/specification#355 (comment) and requesting others with their implementation feedback. At this time there is not enough data/experience to suggest that the specification should require or advise that those two resources should be distinct or hold non-overlapping information. So, at this time, it is an implementation detail in that servers can use the same resource (for the target of both of the link relations) or use separate resources for storage's auxiliary description. |
Currently they differ in CSS, hence the |
I should add that the intention of storageDescription was/is to refer to "storage description of a storage in which this resource is in" (as mentioned in the comments). Practically speaking thus far, x and y are the same resource, and need not be different: </foo> storageDescription <x> .
</> describedby <y> . ( |
Yep that was it. v6 works fine. Thanks! |
Feature description
Currently, this is the description resource
http://localhost:3001/example/profile/card.meta
This is missing fields defined in the notifications spec (https://solid.github.io/notifications/protocol#description-resource-data-model) specifically the
subscription
andchannel
fields.These should be added to the description resource.
Open spec questions: Is there a specific context/frame that all discovery document MUST use when being requested with
application/json+ld
? I think there should be. I've opened another issue for this question here: solid/notifications#165The text was updated successfully, but these errors were encountered: