-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
WIP: Use websocket for notification instead of eventsource #26679
base: main
Are you sure you want to change the base?
Conversation
Good choice with melody, it's something I've been eyeing as well because of easy broadcasts. |
const url = 'ws://' + window.location.host + '/ws'; | ||
const ws = new WebSocket(url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const url = 'ws://' + window.location.host + '/ws'; | |
const ws = new WebSocket(url); | |
const ws = new WebSocket(`${window.location.origin.replace(/^http/, 'ws')}/ws`); |
So it works on HTTPS as well. Should move this code to a separate modules/websocket.js
file later.
I just found melody has a memory switch system so I may change it back to gorilla/websocket directly. |
What do you mean? It seems pretty bare-bone: https://github.com/olahol/melody/blob/master/melody.go |
What are the implications for the helm chart? cc @pat-s |
Reverse proxies may need adjustment to pass through Websockets unharmed. For nginx specifically: proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection; |
@lunny Do you plans to continue here? |
Yes. I will send some code recently. We need a pub/sub interfaces/services on server side. |
No description provided.