What is the best solution for communication between a collection of gRPC service written in GO and Javascript client?

12/7/2019

My plan is about making React application talk to set of gRPC micro-services deployed on Kubernetes (with Istio and Envoy). But after few implementation tries with different libraries such as grpc-gateway, grpc-web,... it seems like those libraries is not completely support gRPC. Each library lacks of some features which are "standards" in traditional XML/JSON over HTTP.

The points of my question are:

  1. Is gRPC truly ready for production?
  2. Do you have any recommendations for implementing micro-services in Go with gRPC to talk to web client.
-- Phương Hầu
go
grpc
kubernetes
microservices
reactjs

1 Answer

12/7/2019

You should use grpc-web if you are using Istio, as Istio will automatically handle proxying your http/1 requests into the http/2 requests that your grpc service understands.

gRPC is ready for production and is used by many corporations.

My recommendation is to keep your code in a monorepo, use Bazel as your build system, and Istio as your service mesh.

The monorepo approach allows you to avoid one of the most painful aspects of dealing with gRPC / protobufs - the sharing of the proto files across language / client / service boundaries. (There are Bazel rules which create libraries from your proto files in various languages). The JavaScript rules are Beta quality as of November 2019 but they are quickly maturing.

Since you are already using Istio as your gRPC proxy you can take advantage of its other features, allowing you to move tracing, authentication, service discovery and other concerns out of your application code, so you can focus on business logic.

-- mancini0
Source: StackOverflow