State of the WebSocket API

I found the draft protocol of the WebSocket API here and was wondering what the status is with this and what the roadmap for the future looks like.

  • In the Enterprise Solid Server (I tested it on the Inrupt Pod Space) it seems that the WebSocket API is not activated/implemented. There’s no Updates-Via header being sent and even if I try to connect to various locations I don’t get any answer.
  • In the Community Solid Server (I tested it locally with the Docker version) I get the implementation I was expecting although I don’t quite understand how I can get notified of all changes in a container (there are other forum posts about this). E.g. I subscribe to a container via sub http://localhost:3000/my_container/ and when I create http://localhost:3000/my_container/my_folder/my_file I get a pub http://localhost:3000/my_container. When I delete the aforementioned file I don’t get any notifications, is this the expected behavior? And in the former case (creating the file), I don’t know what inside the container changed so I’m not sure I understand how this can be used to track arbitrary changes inside a container.
  • I haven’t checked the Node Solid Server.

So my questions:

  • How does the roadmap for notifications/live updates look like? Will the WebSocket API make it into ESS? Will it be replaced by something else (I found tickets on GitHub from which I could infer Solid/Inrupt is working on a different implementation)? Will there be feature additions?
  • How can I use the existing CSS implementation to get notified about arbitrary changes inside a container? How can I use the WebSockets for private resources? I.e. how does auth work on it?
  • Could I use something else to get notifications/live updates?

Thanks!

Hi @yvesonline,

I can give you an answer for ESS.

What you are saying is correct, ESS does not have WebSockets notifications enabled at the moment. And as you can infer, we are currently looking at synchronous and asynchronous notifications at Inrupt (included WebSockets) for ESS and the JavaScript Client Libraries. We’ll have more information to share with everyone about it and how it will work in the near future.

In the meantime I’m interested in your use case, how are you planning to use WebSockets? Are you building a Solid app?

Cheers,
Nick-

Hi Nick,

Thanks for the reply and the clarification around WebSockets in ESS!

In the meantime I’m interested in your use case, how are you planning to use WebSockets? Are you building a Solid app?

The idea is to integrate pod notifications (i.e. being notified of changes from multiple personal pods) into our SaaS offering (we’re in semi-stealth, I can give more info in a private message/call if you like). We’re currently in an experimentation stage. Quite honestly WebSockets are not ideal as we would want to use this in our backend and keeping and managing a bunch of open WebSocket connections is not the design approach I was hoping for. A webhook approach where I could register for changes would be ideal.

Is it possible for you to share what options you are looking at and can you narrow down how “near” the near future is?

Cheers
Yves

1 Like

Hey Yves,

Let’s have a chat. Drop me a message at nicolas.mondada@inrupt.com and we can book a quick call.

Cheers,
Nick.-

Hi @nicolasmondada

Sorry for hijack the chat, we are also experience many problems with Websockets while trying to develop out Solid App. We are also very surprised that neither solidommunity not inrupt have them in their servers, making our app almost unworkable for users having their pods hosted by those.

Our user case is:
We are playing around creating a private chat in solid and we are using websockets for the notifications.
We have defined a websocket subscribed to changes on
https://ch1ch0.pod.ideniox.com/inbox/log.txt and another to https://ch1ch0.pod.ideniox.com/outbox/log.txt

We have developed it in a way that all outbound messages are store in the outbox folder and inbound messages in the inbox folder.

Our problem:
Two users, each with a websocked subscribed to two folders. When a user sends a message to another user, both inbox and outbox sockets get triggered. Even other pods we have installed on our own server have their sockets started.

Thanks

Hi @ch1ch0gz ,

Yeap, I understand what your are trying to do. Good thing is we are getting close to a beta release of websockets notifications in ESS and Pod Spaces. I can share with you how we are approaching notifications with websockets, if you are interested drop me message with your email or you can reach our directly at nicolas.mondada@inrupt.com

Cheers,
Nick.-

1 Like

Dear all, I’m shamelessly reviving that thread because of the authentication problem. I think it should not be possible to receive notifications for a resource where one doesn’t have acl:Read permission.

A solution could be to send the access token when connecting with the websocket, and send a DPoP proof with a value of “sub” for the htm field, like:

sub https://example.org/data/test eyJh…

What do you think?