WebSocket client pub/sub?

We have a standard kdb+tick setup that works fine.

As part of the POC, we are trying to create a new web client to tickerplant (subscribing to a topic with low frequency events). The initial attempt was to create a websocket connection, which works fine until the step of data publish from kdb+. Sending data from tickerplant to a websocket handle always result in 'nyi. As I understand, this means that kdb+ does not support spontaneous data publish through a websocket handle yet.

May I know if there is any plan to have this support? Alternatively, is there any idea how I can work around this problem for the meantime so that I can have a web frontend as a pub/sub client?

I think Q supports this because I was able to do it in my kdb web components library. Maybe you forgot to neg the ws handle?

WBR, Andrey Kozyrev.

???, 2 ??? 2017 ?., 8:45:37 UTC+3 ??? Flying ???:

We have a standard kdb+tick setup that works fine.

As part of the POC, we are trying to create a new web client to tickerplant (subscribing to a topic with low frequency events). The initial attempt was to create a websocket connection, which works fine until the step of data publish from kdb+. Sending data from tickerplant to a websocket handle always result in 'nyi. As I understand, this means that kdb+ does not support spontaneous data publish through a websocket handle yet.

May I know if there is any plan to have this support? Alternatively, is there any idea how I can work around this problem for the meantime so that I can have a web frontend as a pub/sub client?

Yes, neg[.z.w] can indeed publish spontaneous message via WebSocket. I found that the reason my code didn’t work is because the underlying code uses -25! for publish instead of the original neg[.z.w] method. It appears that -25! doesn’t support WebSocket handles.

A follow-up question: How do I tell if a given handle is a WebSocket or a normal IPC handle?

> WebSocket or a normal IPC handle

h:()!();o:[`h;;:;]

.z.po:o[;`p]

.z.wo:o[;`w]

Thanks. I was thinking of this, too, but was wondering if there was anything other than keeping a dict. Looks like this is the only way out, then.