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

Quick Notifications #192

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Quick Notifications #192

wants to merge 7 commits into from

Conversation

CxRes
Copy link
Member

@CxRes CxRes commented Feb 5, 2024

Solid Quick Notifications is a proposal to use Accept-Events and Events header fields that I invented in PREP to allow Clients to negotiate subscriptions i.e. request a notification channel, using a mechanism identical to content negotiation in HTTP. With this one can request a notification channel in a single request, and given that a client will anyway start with a GET request to the topic, the subscription step is effectively free when using proactive negotiation. While not as efficient as PREP over a single topic, this would outperform it when requesting notifications for multiple topic resources.

For public channels, I am proposing to introduce a Notification-Channels header field to, well, advertise the channels.

I believe this proposal solves all the issues raised by @timbl in #110 as well as the concern he raised in the notification panel meeting on 12-01-2023 while remaining completely backwards compatible (apart from an extremely minor caveat) with Solid Notifications. One can even use it alongside the existing specification, providing clients a choice of mechanisms for discovery and subscription of notifications.

Updated HTML Preview | Diff with main branch | Diff with backported changes to SNP

Copy link
Member

@csarven csarven left a comment

Choose a reason for hiding this comment

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

Just a Quick Comment for now. Will leave a separate thorough review later once I understand the technicals. High level:

If possible, I'd much rather see how this work can either get incorporated into the current Solid Notifications Protocol or made possible to only extend it. If Solid Notifications Protocol doesn't make it clear how extension could occur, we can improve on that. Essentially, this kind of work should stand on its own as opposed to a "derived from" type of thing.

@CxRes
Copy link
Member Author

CxRes commented Feb 6, 2024

@csarven This is to start a conversation. My long term suggestion (especially if such a work can get funded), is to reorganize Solid Notifications in a number of specifications:

  • Solid Notifications: Discovery and Subscription
  • Solid Notifications: Quick Discovery and Notifications
  • Solid Notifications: Channels
  • Solid Notifications: < Channel Type >
  • Solid Notifications: Messages for RDF resources
  • Solid Notifications: Messages for < content-type or content category >

Really, the bulk of work has to be done in the last two! It also makes it easier for someone entering Solid Notifications to work with more palatable chunks! This might be a good opportunity to rebrand as well, Since these notifications can easily be used outside Solid.

Comment on lines +16 to +17
* Latest Published Version:
* [Solid Quick Notifications Protocol](https://solidproject.org/TR/quick-notifications-protocol)
Copy link
Member

Choose a reason for hiding this comment

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

404 I would suggest to add that link once it gets published

Copy link
Member Author

Choose a reason for hiding this comment

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

My intention was that when the PR gets accepted, it will be created.

Happy to comment it out if it is a problem...

Copy link
Member

Choose a reason for hiding this comment

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

Since this is an edit to the current notifications protocol document, I will need to go through the diff

Copy link
Member Author

Choose a reason for hiding this comment

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

Use the diff I have created in the first comment. That compares with the latest SNP version!

Copy link
Member

Choose a reason for hiding this comment

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

@csarven
Copy link
Member

csarven commented Feb 7, 2024

Can we take this up in an STM? I'd like to understand better whether this should be incorporated into SNP or being proposed as a new work item or what...

.. In addition to noting any early commitments for implementation.

@CxRes
Copy link
Member Author

CxRes commented Feb 7, 2024

First and foremost, I would like for the reviewers to verify if my proposal is functionally correct!

We can decide then how to proceed, an extension, an independent work item or re-organization of notification specs. I think all three are viable, but it is really a question of resources and participation.

I would like an STM as well, perhaps after a first round of reviews!

Adds the Solid Quick Notifications Protocol that enables Solid Servers to directly provide clients with notification channels and/or let them negotiate subscriptions using HTTP headers within any GET requests.
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.

It's a start...

quick-protocol.html Outdated Show resolved Hide resolved
quick-protocol.html Outdated Show resolved Hide resolved
quick-protocol.html Outdated Show resolved Hide resolved
quick-protocol.html Outdated Show resolved Hide resolved
quick-protocol.html Outdated Show resolved Hide resolved
quick-protocol.html Outdated Show resolved Hide resolved
Comment on lines 623 to 624
<li><code>Solid</code> as a List Item [<cite><a class="bibref" href="#bib-sf">STRUCTURED-FIELDS</a></cite>], and</li>
<li>parameters of <a href="#notification-channel">notification channel</a> set according to the <a href="#notification-channel-data-model" rel="rdfs:seeAlso">Notification Channel Data Model</a>.</li>
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
<li><code>Solid</code> as a List Item [<cite><a class="bibref" href="#bib-sf">STRUCTURED-FIELDS</a></cite>], and</li>
<li>parameters of <a href="#notification-channel">notification channel</a> set according to the <a href="#notification-channel-data-model" rel="rdfs:seeAlso">Notification Channel Data Model</a>.</li>
<li><code>Solid</code> as a List Item [<cite><a class="bibref" href="#bib-sf">STRUCTURED-FIELDS</a></cite>]</li>
<li>parameters of <a href="#notification-channel">notification channel</a> set according to the <a href="#notification-channel-data-model" rel="rdfs:seeAlso">Notification Channel Data Model</a></li>

Copy link
Member Author

Choose a reason for hiding this comment

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

Will revisit <li> punctuation later. My preferences are clearly inconsistent with the document!

quick-protocol.html Show resolved Hide resolved
quick-protocol.html Outdated Show resolved Hide resolved
quick-protocol.html Outdated Show resolved Hide resolved
CxRes and others added 2 commits February 10, 2024 07:23
Fixes multiple typo and language errors.

Co-authored-by: Ted Thibodeau Jr <[email protected]>
Fixes typos and language in SNP, arising from TallTed's review of SQNP.
@CxRes
Copy link
Member Author

CxRes commented Feb 10, 2024

@TallTed Great Start!!! Thanks for detailed review. I have accepted (and backported) most of your suggestions. The only changes that I have not accepted have to do with <li> punctuation, which I will revisit later.

@csarven Can you please look at Conformance section suggestions made by Ted (since these are really fixes to SNP). If you agree, I will merge them in and backport them to protocol.html.

Fixed inconsistent use of `solid` as a protocol identifier on `Accept-Events` and `Events` header field to lowercase.
Fixed a spurious text on line 671
Fixed example code based on discussion with elf Pavlik in the Solid STM on 5 March 2024.
Also, added some missing quotation marks and other minor fixes.
Fixed unnecessary repetition of "Events" in the Subscription Response -> response status.

<figure id="solid-notifications-flow-receivefrom" rel="schema:hasPart" resource="#solid-notifications-flow-receivefrom">
<img rel="schema:image" src="notifications-flow-receivefrom.mmd.svg" width="800" />

<figcaption property="schema:name">Solid Notifications Flow Receive From, where the receiver establishes connection to sender.</figcaption>
<figcaption property="schema:name">Solid Notifications Flow Receive From, where the a receiver establishes connection to a sender.</figcaption>
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
<figcaption property="schema:name">Solid Notifications Flow Receive From, where the a receiver establishes connection to a sender.</figcaption>
<figcaption property="schema:name">Solid Notifications Flow Receive From, where a receiver establishes connection to a sender.</figcaption>

Copy link
Contributor

Choose a reason for hiding this comment

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

or ...

Suggested change
<figcaption property="schema:name">Solid Notifications Flow Receive From, where the a receiver establishes connection to a sender.</figcaption>
<figcaption property="schema:name">Solid Notifications Flow Receive From, where the receiver establishes connection to a sender.</figcaption>

</figure>

<p>The following diagram illustrates the flow of data for those Notification channel types in which a client establishes a subscription and does not maintain a persistent connection to a notifications source:</p>

<figure id="solid-notifications-flow-sendto" rel="schema:hasPart" resource="#solid-notifications-flow-sendto">
<img rel="schema:image" src="notifications-flow-sendto.mmd.svg" width="800" />

<figcaption property="schema:name">Solid Notifications Flow Send To, where the sender delivers notifications to receiver.</figcaption>
<figcaption property="schema:name">Solid Notifications Flow Send To, where the sender delivers notifications to a receiver.</figcaption>
Copy link
Contributor

Choose a reason for hiding this comment

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

should probably match line 459, a or the

Suggested change
<figcaption property="schema:name">Solid Notifications Flow Send To, where the sender delivers notifications to a receiver.</figcaption>
<figcaption property="schema:name">Solid Notifications Flow Send To, where a sender delivers notifications to a receiver.</figcaption>

@@ -567,7 +567,7 @@ <h2 property="schema:name">Protocol</h2>

<p id="json-ld-format">This specification uses JSON-LD [<cite><a class="bibref" href="#bib-json-ld11">JSON-LD11</a></cite>] as the preferred data format, and <code>https://www.w3.org/ns/solid/notifications-context/v1</code> as a URI for the JSON-LD context and as a value of the <code>profile</code> parameter used for content negotiation.</p>

<p id="authentication-authorization">This specification does not require a specific authentication and authorization mechanism to be used with the Solid Notification Protocol. Implementations are encouraged to use existing approaches, such as those described in the Solid Protocol sections on <cite><a href="https://solidproject.org/TR/protocol#authentication" rel="cito:discusses">Authentication</a></cite> and <cite><a href="https://solidproject.org/TR/protocol#authorization" rel="cito:discusses">Authorization</a></cite> [<cite><a class="bibref" href="#bib-solid-protocol">SOLID-PROTOCOL</a></cite>].</p>
<p id="authentication-authorization">This specification does not require a specific authentication and/or authorization mechanisms to be used with the Solid Notification Protocol. Implementations are encouraged to use existing approaches, such as those described in the Solid Protocol sections on <cite><a href="https://solidproject.org/TR/protocol#authentication" rel="cito:discusses">Authentication</a></cite> and <cite><a href="https://solidproject.org/TR/protocol#authorization" rel="cito:discusses">Authorization</a></cite> [<cite><a class="bibref" href="#bib-solid-protocol">SOLID-PROTOCOL</a></cite>].</p>
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
<p id="authentication-authorization">This specification does not require a specific authentication and/or authorization mechanisms to be used with the Solid Notification Protocol. Implementations are encouraged to use existing approaches, such as those described in the Solid Protocol sections on <cite><a href="https://solidproject.org/TR/protocol#authentication" rel="cito:discusses">Authentication</a></cite> and <cite><a href="https://solidproject.org/TR/protocol#authorization" rel="cito:discusses">Authorization</a></cite> [<cite><a class="bibref" href="#bib-solid-protocol">SOLID-PROTOCOL</a></cite>].</p>
<p id="authentication-authorization">This specification does not require a specific authentication and/or authorization mechanism to be used with the Solid Notification Protocol. Implementations are encouraged to use existing approaches, such as those described in the Solid Protocol sections on <cite><a href="https://solidproject.org/TR/protocol#authentication" rel="cito:discusses">Authentication</a></cite> and <cite><a href="https://solidproject.org/TR/protocol#authorization" rel="cito:discusses">Authorization</a></cite> [<cite><a class="bibref" href="#bib-solid-protocol">SOLID-PROTOCOL</a></cite>].</p>


<figure id="solid-quick-notifications-flow-receivefrom" rel="schema:hasPart" resource="#solid-quick-notifications-flow-receivefrom">
<img rel="schema:image" src="notifications-flow-receivefrom.mmd.svg" width="800" />

<figcaption property="schema:name">Solid Quick Notifications Flow Receive From, where the receiver establishes connection to sender.</figcaption>
<figcaption property="schema:name">Solid Quick Notifications Flow Receive From, where the receiver establishes a connection to a sender.</figcaption>
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, should match earlier. I think a is better than the, throughout.

Suggested change
<figcaption property="schema:name">Solid Quick Notifications Flow Receive From, where the receiver establishes a connection to a sender.</figcaption>
<figcaption property="schema:name">Solid Quick Notifications Flow Receive From, where a receiver establishes a connection to a sender.</figcaption>

</figure>

<p>The following diagram illustrates the flow of data for those Notification channel types in which a client establishes a subscription and does not maintain a persistent connection to a notifications source:</p>

<figure id="solid-quick-notifications-flow-sendto" rel="schema:hasPart" resource="#solid-quick-notifications-flow-sendto">
<img rel="schema:image" src="notifications-flow-sendto.mmd.svg" width="800" />

<figcaption property="schema:name">Solid Quick Notifications Flow Send To, where the sender delivers notifications to receiver.</figcaption>
<figcaption property="schema:name">Solid Quick Notifications Flow Send To, where the sender delivers notifications to a receiver.</figcaption>
Copy link
Contributor

Choose a reason for hiding this comment

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

Again...

Suggested change
<figcaption property="schema:name">Solid Quick Notifications Flow Send To, where the sender delivers notifications to a receiver.</figcaption>
<figcaption property="schema:name">Solid Quick Notifications Flow Send To, where a sender delivers notifications to a receiver.</figcaption>

@CxRes
Copy link
Member Author

CxRes commented Mar 7, 2024

@TallTed Thanks again! These batch of changes I was (mostly) aware of, but did not make them because they apply to the main protocol itself!

Having said that, I will accept them and backport them to SNP (sometime, next week, though).

@elf-pavlik
Copy link
Member

Given PREP and PREP-Solid, do you still plan to pursuit this proposal?

@CxRes
Copy link
Member Author

CxRes commented Jul 30, 2024

Why not? The basic concept is still good...

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