News for hackers. Stuff that matters.

throaaway1984

Re:The state of gRPC in the browser on Wednesday January 09, 2019 @05:53PM (#18869858)
I think you can use both[1]; gRPC doesn't compete with GraphQL really.

[1] https://github.com/google/rejoiner

Re:The state of gRPC in the browser on Wednesday January 09, 2019 @05:40PM (#18869750)
gRPC is protocol agnostic. You can use any wire type with it, like JSON. There's even a codec for thrift messages on gRPC called grift.
Re:The state of gRPC in the browser on Wednesday January 09, 2019 @05:38PM (#18869730)
Websockets have head-of-line blocking, which is one of the main reasons HTTP/2 exists.

HTTP/2 (i.e. gRPC) is a bidirectional streaming protocol, and you can use the fetch API in JS to use it. The reason gRPC-web exists is because browsers artificially hide some of the headers, which have been part of the HTTP standard since the beginning. If that was fixed, gRPC would just be plain XHR or fetch requests and gRPC-web would go away.