-
Notifications
You must be signed in to change notification settings - Fork 262
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
Websocket module: notifications through websocket #1669
Comments
After today discussions on skype, more info on how implement this. Let's consider that ws module keeps a table relating subIds (as string) and ws_hdls (websocket handles, in a structure used by the module, @fortizc I understand that you control that part). Table implementation details are out of scope of this description (although probably a At CB startup time, the table starts empty. Let's consider the different flows:
|
Draft for sendNotifyContextRequestWs() signature:
The JSON send back to the client to the ws handler associated to the subscription would be as follows:
|
Important remarks: in the above descriptions, "ws://" refers to an exact text (of 5 chars), not to a prefix as it could be "http://". |
Implemented in PR #2004 |
(Parent issue: #1181)
We could consider a new kind of subscriptions that instead of sending notifications through HTTP REST use the websocket used to create the subscription in order to send notifications back. A new URL schema (e.g. ws://) could be used so Orion can clearly identify them.
Probably this kind of subscriptions doesn’t need to be persisted in DB (it would live only in CB memory) given that once the websocket is closed by the client, then the subscription is immediately removed.
[ See issue #1943 for details about notifications in Active-Active environment ]
The text was updated successfully, but these errors were encountered: