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

Support grpc-web #1347

Open
jzelinskie opened this issue May 23, 2023 · 3 comments
Open

Support grpc-web #1347

jzelinskie opened this issue May 23, 2023 · 3 comments
Labels
area/api http Affects the HTTP Gateway API area/api v1 Affects the v1 API state/needs discussion This can't be worked on yet

Comments

@jzelinskie
Copy link
Member

Despite a general trend of grpc-web becoming less popular over time, there are still environments, such as Cloudflare Workers, that make sense to leverage grpc-web rather than grpc-gateway.

In the past, we've ran a small proxy that embeds Improbable's grpc-web implementation -- there's no reason why we couldn't build this directly into SpiceDB.

@jzelinskie jzelinskie added area/api v1 Affects the v1 API state/needs discussion This can't be worked on yet area/api http Affects the HTTP Gateway API labels May 23, 2023
@RichiCoder1
Copy link

I believe this would allow using this: https://github.com/timostamm/protobuf-ts/tree/main/packages/grpcweb-transport

Which appears to be WinterCG env compatible (e.g. it uses fetch and no node deps)

@RichiCoder1
Copy link

RichiCoder1 commented Jun 13, 2023

Another option I've recently discovered that might be interesting for ya'll is Buf's connect: https://connect.build/docs/introduction

Their JS/HTTP API implementation seems excellent and compatible w/ fetch/WinterCG environments.

(and supports grpc-web too)

@rikkuness
Copy link

In my own servers I've added a configurable option to enable the improbable grpc-web server listed above. It's useful for convenience but in production type deployments I'll instead offload this to an Envoy reverse proxy/sidecar using the GrpcWeb filter https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/grpc_web_filter

I've also used both of these with the above mentioned protobuf-ts and both work perfectly well together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api http Affects the HTTP Gateway API area/api v1 Affects the v1 API state/needs discussion This can't be worked on yet
Projects
None yet
Development

No branches or pull requests

3 participants