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

feat: replace grpc-js with grpc-web for clients #424

Closed
pfletcherhill opened this issue Jan 13, 2023 · 2 comments
Closed

feat: replace grpc-js with grpc-web for clients #424

pfletcherhill opened this issue Jan 13, 2023 · 2 comments
Labels
t-chore Miscellaneous improvements
Milestone

Comments

@pfletcherhill
Copy link
Contributor

No description provided.

@pfletcherhill pfletcherhill converted this from a draft issue Jan 13, 2023
@pfletcherhill pfletcherhill added the t-chore Miscellaneous improvements label Jan 13, 2023
@pfletcherhill pfletcherhill added this to the v2.0.0 p3 milestone Jan 13, 2023
@kcchu
Copy link
Contributor

kcchu commented Jan 15, 2023

I took a look at this but I am not sure about the target of this issue. grpc-web is a different protocol than grpc. grpc uses HTTP/2 special features that are hard to be supported by browser clients. What grpc-web do is defining a protocol that is compatible with HTTP and browser clients and convertible to grpc. It seems to me that hub rpc is primarily server-to-server, and the case for browser clients to call hub rpc directly is very rare. (web apps usually use higher level Merkle API instead) Also, the support for grpc-web in language other than JS is very bad. Therefore, I think grpc+flatbuffer seems to be a better choice for hub rpc.

@pfletcherhill
Copy link
Contributor Author

Based on some experimentation, it seems like hubs can support both grpc and grpc-web if we host a proxy to translate between the grpc-web HTTP and grpc HTTP/2 calls. That would allow other hubs or backends to communicate with the hubs over grpc and also let devs build client-only apps that use grpc-web. So this issue is not actually replacing grpc-js with grpc-web, we just want to add support for grpc-web. Going to close this issue in favor of the other linked issue #573.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-chore Miscellaneous improvements
Projects
Archived in project
Development

No branches or pull requests

2 participants