elm-protocol-buffers
elm-protocol-buffers copied to clipboard
gRPC-web support
Now that gRPC-Web seems to be becoming the standard to access gRPC backend
services from web app (https://grpc.io/blog/grpc-web-ga/), it would be great to support gRPC.
Any plans?
Relevant links:
- gRPC-Web "spec": https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md#protocol-differences-vs-grpc-over-http2
- gRPC-Web js library & protoc plugin: https://github.com/grpc/grpc-web
- gRPC-Web Go wrapper & proxy and Typescript library & protoc plugin by Improbable - https://github.com/improbable-eng/grpc-web
- gRPC-Web envoy filter - https://www.envoyproxy.io/docs/envoy/latest/configuration/http_filters/grpc_web_filter
Thanks for your message, @stepanstipl . A short heads up:
- Currently, I am working on a big refactoring of the library and generator to resolve some of the current limitations or enable future support for them;
- I am not sure supporting gRPC will be my next step, as I am gaining interest in RSocket which implements more powerful asynchronous Reactive Streams;
- I really would like to use WebSockets with either of them, but unfortunately Elm should either support them or accept
Bytesover ports.
Thanks a lot for reply @eriktim.
I am not sure supporting gRPC will be my next step, as I am gaining interest in RSocket which implements more powerful asynchronous Reactive Streams;
RSocket seems interesting and I'll definitely check it out.
I was hoping that with the gRPC-web standard it should be fairly easy to add support for generating the gRPC portion of the code using standard Elm http library. As someone who has a lot of experience, do you think that's feasible?
I really would like to use WebSockets with either of them, but unfortunately Elm should either support them or accept Bytes over ports.
It seems that gRPC-web, resp. the Improbable's implementation (https://github.com/improbable-eng/grpc-web), does support WebSockets on the server-side. However, I understand you're referring to Elm side lacking support.
To put my use-case in context - I have a project written in go, using gRPC/protobuf, and basically, I'm looking for the best way to extend this to the front-end side of things while hopefully reusing all the gRPC/protobuf definitions and ideally avoiding additional middle layer(s) like grpc-gateway.
I'm still thinking that the gRPC-web and your protobuf library might be the "easiest" way, however, I'm very new to Elm and any thoughts/tips on this topic are much appreciated!