Microservices with gRPC


Why gRPC?

What is gRPC?

gRPC is a modern open source high performance RPC framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking and authentication. It is also applicable in last mile of distributed computing to connect devices, mobile applications and browsers to backend services.

source: grpc.io

The story behind gRPC


How to use gRPC?

$ npm install -g grpc-tools
$ grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./ --grpc_out=./ --plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` helloworld.proto
$ node server.js
# In different terminal
$ node client.js
# output
$ Greeting: Hello World

Hurray !!! we successfully completed our first gRPC “Hello World” implementation.




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store