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

Replace TypeScript gRPC-web library with something that can be improved #6214

Open
niloc132 opened this issue Oct 18, 2024 · 0 comments
Open
Assignees
Labels
feature request New feature or request triage

Comments

@niloc132
Copy link
Member

The standard gRPC-web library isn't usable by us - it explicitly doesn't support streaming binary data, and has no provisions for streaming without h2.

Instead, we've used https://github.com/improbable-eng/grpc-web until now, and extended it slightly to use a single websocket transport for multiple gRPC streams.

We're hitting its limits in several ways:

  • First, it is no longer maintained - we can sometimes merge changes, but have yet to get a release with any changes in it.
  • No interceptors are supported, so we manually attach grpc metadata to each request anywhere in the codebase.
  • Even though we can send metadata on requests, there is no way to receive metadata from the server with the generated calls, we need to manually build calls to handle this case
  • Fetch/websocket api isn't pluggable, but always read from globals, so we can't easily polyfill these (in node, etc) without attaching them to globals. Most polyfills don't work very well anyway, so this isn't a huge limitation, but still irritating.
  • Our codegen to use these calls from GWT isn't great, but that isn't the fault of the library, but could be remedied by some solutions to this issue. Depending on how we approach it, we could share more code between server and client this way too.

This is currently not scoped to also handle protobuf in java/gwt, but that would give us some compiled size savings as well.

@niloc132 niloc132 added feature request New feature or request triage labels Oct 18, 2024
@niloc132 niloc132 self-assigned this Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request triage
Projects
None yet
Development

No branches or pull requests

1 participant