Feature Request: gRPC-web adapter.
Closed this issue · 1 comments
I would like to use your JavaScript gRPC client directly from a browser. That would support single page applications that only need to contact the EventStoreDB.
Shiny New gRPC-Web Client -> Browser -> gRPC-web -> Envoy -> gRPC -> EventStoreDB :-) ƪ(‾.‾“)┐
I have tried to use your existing NodeJS client from the browser with an Envoy proxy. My initial attempts failed (probably because your existing NodeJS client works with gRPC and not with gRPC-web; I do not know much about gRPC.)
Existing gRPC Client -> Browser -> gRPC-web -> Envoy -> gRPC -> EventStoreDB ¯\(°_o)/¯
My current workaround involves using Koa as an HTTP proxy/adapter like this:
HTTP Client -> Browser -> HTTP -> HTTP Server -> Existing gRPC Client -> gRPC -> EventStoreDB :-/
That works and yet I would like to make gRPC-web calls directly, because I think that provides a cleaner implementation.
Hi Shawn,
I've previously looked into a gRPC-web client, but currently it's not possible due to the lack of client to server and bidi streaming.
gRPC-web roadmap for adding them is here:
https://github.com/grpc/grpc-web/blob/master/doc/streaming-roadmap.md
This hasn't been updated since 2020, but the latest word on it can be found here:
grpc/grpc-web#1205 (comment)
These are used for both appending events and persistent subscriptions.
So, unfortunately, this is unlikely to happen for quite some time.