nodeSolidServer/node-solid-ws

No notification through WebSocket when inserting documents in a solid container

Opened this issue · 5 comments

With this toy example i get no notification when inserting or deleting resources on http://solidtest.space:

const WebSocket = require('ws');
var ws = new WebSocket('wss://davide.solidtest.space/public/twee-fi/');

ws.on('open', function open() {
  console.log('Done');
});

ws.on('message', function incoming(data) {
  console.log(data)
});

The request:

curl -XPUT -H "Content-Type: text/turtle" -H'Cookie:somecookie' 'https://davide.solidtest.space/public/twee-fi/test.ttl' -d "<http://subje.ct> <https://predica.te> <http://obje.ct> .\n"

See also chatlog

@DavideAllavena is this a blocker? If so, I suggest we add the priority label to this.

Yes this is a blocker. We are developing an application that creates a web-socket to get notified on changes in a container. We can temporarily create a dirt workaround. But we are willing not to do it.

@DavideAllavena ok thanks, will try and prioritize this. Or if you manage to work out a patch, we'll get it upstream asap! :)

@DavideAllavena Is this still an issue? you should send sub /public/twee-fi/ from your WebSocket client to subscribe it. Example: in one window, type:

 wscat --no-check --connect wss://localhost:8443/
connected (press CTRL+C to quit)
> sub /inbox
< ack /inbox

Then in another window, type:

curl -kX  POST  https://localhost:8443/inbox

You'll see < pub /inbox appear.

We just found out that it's because you're using PUT instead of POST, see #9