What does HackerNews think of grpc-web?

gRPC for Web Clients

Language: JavaScript

#16 in JavaScript
> I mitigate it by configuring the serializer to be tolerant of new or missing keys, enum values, et

Good point, we do that too.

> We actually considered grpc at some point but decided against it as being a bit too limiting and mobile centric at the time. Also, grpc in a browser was not well supported at the time we looked. Maybe that has changed?

Its supported: https://github.com/grpc/grpc-web

Transcoding to HTTP is also supported: https://cloud.google.com/endpoints/docs/grpc/transcoding

https://cloud.google.com/blog/products/api-management/unders...

Really odd how there is a dozen comments on RPC but no one mentioned gRPC for the web browser. Google goes in the reverse, where from both protobuf you autogenerate API boilerplate, client stubs and even REST-over-HTTP apis.

https://github.com/grpc/grpc-web

I adore gRPC but figuring out how to use it from browser JavaScript is painful. The official grpc-web [1] client requires envoy on the server which I don't want. The improbable-eng grpc-web [2] implementation has a native Go proxy you can integrate into a server, but seems riddled with caveats and feels a bit immature overall.

Does grpc-web work well? Is there a way to skip the proxy layer and use protobufs directly if you use websockets?

[1]: https://github.com/grpc/grpc-web [2]: https://github.com/grpc/grpc-web

Our technology stack is very gRPC friendly, so developer experience is actually better with it, than without (though this is very subjective.)

As for the middleboxes, using gRPC-WEB[1] allowed us to switch Desktop Client App to gRPC even behind firewalls/IDSes that do not speak HTTP/2 yet.

As for the HAProxy, Dropbox used to use (circa 2013) it specifically for loadbalancing, but we eventually replaced it with our Golang proxy. That said, recent HAProxy improvements (v2.0+) make it quite an awesome dataplane and an excellent loadbalancer!

[1] https://github.com/grpc/grpc-web

You can use it inside a browser. Look at https://github.com/grpc/grpc-web but I agree that something like playing with curl would be impossible. I once even stumbled upon a golang project that can generates a RESTful API from your gRPC API without any modifications on your server side.
It's available now! Yay! [1]

With gPRC there's still a lot of binding code, and you need to map all of that in Java, but you do get some validation etc. out of it. It does make the 'data transfer' comparison a little less harsh.

[1] https://github.com/grpc/grpc-web

The first pain point in the article of no browser support is no longer true. There is now grpc-web https://github.com/grpc/grpc-web/
In case you didn't see recently, https://github.com/grpc/grpc-web came out of hidden-repo status recently. Of course there are caveats to its use, but I believe a server side gateway may always be needed due to how http/2 is used but I'm unsure.