-
-
Notifications
You must be signed in to change notification settings - Fork 52
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 PoC #242
base: beta
Are you sure you want to change the base?
Websocket PoC #242
Conversation
I would like to merge this feature into beta first, can you try to rebase your branch into beta first please ? |
This is just proof of concept to show how it could be done. It was never completed. I could make it work but https://github.com/acouvreur/sablier/pull/241 needs to be merged first. |
I've squashed your commits from the previous PR, sorry if that causes issues on your side :D |
Maybe we can mark the PR as draft? |
bbaaeec
to
5f63811
Compare
do this PR was merge into Beta branch ? |
I've not completed it yet. |
@tomaszduda23 do you need help =) i'll be glad to help |
The help would be great. You can open new PR based on that. I can help to review.
|
what is your test case scenario ? will get a bit of time for it asap |
There are E2E tests in the repo https://github.com/acouvreur/sablier/blob/dda8caec9ca4a9fade363b74a2776714b48d91da/e2e/e2e_test.go#L51 For websocket the end point would be /echo. The test should look like:
The first call is done by http. It is handled by current implementation. After that data are exchanged over tcp here you can see only print messages. The rest of implementation is missing. |
@tomaszduda23 @acouvreur
am i right ? |
http is based on TCP. After http negotiation "hijack" happens and exactly the same connection is used for websocket. You do not need tcp middleware at all.
Scale up is already implemented too. Make the tests first. Than the rest will be clear when you see the logs. |
in case of websocket only blocking strategy make sense. If user select dynamic strategy and service is scaled down I would return 503 probably. It would still work with dynamic if websocket is not the first connection required by service. It should be fine e.g. for visual studio code. |
@tomaszduda23 iit seems to work , will make a bit a of cleaning , before opening a new PR =) |
6039eda
to
052f7db
Compare
It could be used to implement websocket https://github.com/acouvreur/sablier/issues/21