3 ms·
I'd want to because grpc doesn't support javascript on the web. REST is the defacto standard. I am aware Google use gRPC in their SDKs and backends, none of wh
by brango 9y ago
I'd want to because grpc doesn't support javascript on the web. REST is the defacto standard.
I am aware Google use gRPC in their SDKs and backends, none of which are JS web.
So yes, I want to build microservices with gRPC but expose them with REST for legacy/external clients.
- pjmlp 9y agoI imagine that could be done via native JS arrays or a WebAssembly module, just not sure if it would be an improvement versus REST(JSONP) from performance point of view.
- anameaname 9y agoThe problem with web is that browsers don't expose trailers. gRPC depends on having trailers to know if the RPC succeeded or failed, but neither Chrome nor Firefox, nor any other browsers surface this information. If this was exposed in the XHR or Fetch API, gRPC would work. It's browsers in this case that are the laggard (trailers have been part of the spec since HTTP/1.1).
- muxator 9y agoSorry, what is a trailer?