Better HN
topnewbestaskshowjobs
Log inSign up

throaaway1984

3 karma · joined Jan 9, 2019 (7y ago) · 3 submissions

Submissions

comment 7y ago · link · parent

I think you can use both[1]; gRPC doesn't compete with GraphQL really.

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

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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.