Skip to content
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

Add new transport: gRPC-Web #693

Open
thernstig opened this issue Feb 2, 2024 · 2 comments
Open

Add new transport: gRPC-Web #693

thernstig opened this issue Feb 2, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@thernstig
Copy link

Is your feature request related to a problem? Please describe.
There is a new standard called gRPC-Web that could be used as a transport between a client (browser) and backend service.

https://grpc.io/blog/postman-grpcweb/

It might be nice to have that as an alternative for Socket.IO when setting up the socket?

Describe the solution you'd like
Implement gRPC-Web

Describe alternatives you've considered
https://developer.mozilla.org/en-US/docs/Web/API/WebTransport is an alternative, but gRPC-Web might arguably be more performant. Leave the power to the user to decide what to use as transport.

Additional context
None

@thernstig thernstig added the enhancement New feature or request label Feb 2, 2024
@darrachequesne
Copy link
Member

That's an interesting idea, thanks for the heads-up 👍

WebTransport is an alternative, but gRPC-Web might arguably be more performant.

Do you have any source for that claim? Given that gRPC is built on HTTP/2 (TCP), I would have thought that WebTransport (based on UDP) would be more performant.

References:

@thernstig
Copy link
Author

@darrachequesne when I read up more on this, I am not confident gRPC-Web is suitable for socket.io - at least not yet. It seems to require a proxy (Envoy). It is currently also only good for server streaming, not client streaming. So maybe close this issue and re-open in the future?

Regarding HTTP/2 (gRPC) vs WebTransport (UDP), only some future performance measurements could solve that. What I believe is that the gRPC serialization packs more information than e.g. JSON, hence less data, hence more performant. But do not take my word for it: I do not know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants