-
Notifications
You must be signed in to change notification settings - Fork 435
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
[Feature] multiplex over a websocket #1081
Comments
Hi! I doubt this is something we are going to implement here, browsers are planning on implementing websockets over HTTP/2 AFAIK, which should eventually solve the maximum connection issues. |
how would that work then on the go side? would you get a special websocket implementation that then gives back somekind of 'virtual' websocket? |
That I do not know |
Would it be technically feasible? (i was trying implement it but i have never written go before 😄 ) |
Oh I'm sure it would be, but the websocket abstraction on the backend would need to perform all the multiplexing work unless the standard library can somehow abstract that. https://datatracker.ietf.org/doc/html/rfc8441 this appears to be the RFC. coder/websocket#4 is the issue for our websocket library, which seems to depend on golang/go#32763. |
I will try to implement it in scala, i'm more experienced with that, and if it was easy to implement i will port it to go and the typescript client. |
I tried to implement it in go but i get an so somewhere around here it goes wrong and it gives an error but it is probably because the request doesn't have the right headers. any suggestions how i can find out what is wrongly configured in the req which makes it fail? |
I am interested in this work and will attempt to debug thank you for moving this along. |
You are making good progress I ran the test through the debugger and found this. Taking a deeper look now.
|
Well it seems to be making better progress now that we understand the failure.
|
@hexfusion Thank you that really helped, after adding the framing like typescript, Currently i have added the 'websocket channel' into the go proxy. My todo list still is:
|
ok great, I would like to try and help move the todo forward how can I collab? on your fork? |
I will continue to work today on it, i can open a pr and you can give me
some advice? On the go part?
…On Sat, Feb 19, 2022, 16:20 Sam Batschelet ***@***.***> wrote:
ok great, I would like to try and help move the todo forward how can I
collab? on your fork?
—
Reply to this email directly, view it on GitHub
<#1081 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABNXZFQ3RGJFOBZYOAEJWDTU36YLLANCNFSM5OJLQSYA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@johanbrandhorst I was exploring this library in hope of writing a webapp (for browsers) using gRPC. Since gRPC uses a single multiplexed HTTP2 connection, when WebSocket can be multiplexed, I'd say not multiplexing websocket highly reduce the efficiency of the library (due to WS handshakes for each new function call). @borissmidt I might not be good enough to help out, but how's your progress? I observed that your branch change (client side) exports. I'd suggest exporting another |
I'm planning to go to a separate package to only support the 'grpc-websocket' protocol (instead of grpc-web) to make the scope of the package more clear and significantly reduce the maintenance burden. At the moment i have not found a lot of time to continue this project, but i would really be glad with some help on the front of integration tests. So currently i have a go server which serves 'grpc-webscoket' and i implemented the typscript client. The current working branch is here. I got stuck at implementing integration tests, because of my lack of skill in typescript, frontend code and NodeJS. Open issues improvements are:
|
Dear,
I was wondering, could a websocket be multiplexed so it really mirrors the java/go api? So you create 1 connection per stub, this would allow grpc-web to have a huge amount of streams.
Maybe a simple protocol could be defined in protobuf itself to make it easy to implement in other languages to have an InProcessProxy reducing the need for proxies.
The only disadvantage is that the proxy then has to keep state to track which message maps to which stream.
Would you be interested in such a feature or would it be too complex to implement?
For the protocol i was thinking along the lines of:
The text was updated successfully, but these errors were encountered: