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

Enabling components to listen to any server-side change #64

Closed
RubenVerborgh opened this issue Apr 30, 2020 · 2 comments
Closed

Enabling components to listen to any server-side change #64

RubenVerborgh opened this issue Apr 30, 2020 · 2 comments
Labels
new feature New feature request

Comments

@RubenVerborgh
Copy link
Contributor

Need

  • The Solid React components currently offer a way to listen to any changes (in addition to specific changes).
  • Currently, this any is determined by subscribing to updates for every target URL of an outgoing HTTP request.
    • For example, if requests are made to http://a.com/12, http://b.com/45, then the React components will subscribe to the WebSockets running on both hosts, and trigger a refresh on any pub event.

Solution in solid-auth-client

  • A request event is exposed, such that the React components see every request that is made with the fetcher.
    • Based on these URLs, a WebSocket is set up to every unique host.

Concerns with the existing solution

  • solid-auth-client leaks all requests that any client-side library makes to all client-side librariess, which is a potential security issue.

Solution paths

  • only expose hosts or WebSocket URLs (which are roughly equivalent; one comes from the other)
    • very solution-specific though
    • perhaps also a security problem
  • remove the listen all functionality from the React components
    • then only listening to specific resources will be supported
@RubenVerborgh RubenVerborgh added the new feature New feature request label Apr 30, 2020
@RubenVerborgh RubenVerborgh changed the title Enabling components tot listen to any server-side change Enabling components to listen to any server-side change Apr 30, 2020
@michielbdejong
Copy link

@NSeydoux Are you working on this? We need Websockets support for nodeSolidServer/node-solid-ws#1 (comment).

Would you accept a pull request?

@nicolasmondada
Copy link
Contributor

This should be discussed in https://github.com/inrupt/solid-client-notifications-js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature request
Projects
None yet
Development

No branches or pull requests

3 participants