The main usage scenarios:
Low latency, highly scalable, distributed systems.
Developing mobile clients which are communicating to a cloud server.
Designing a new protocol that needs to be accurate, efficient and language independent.
Layered design to enable extension eg. authentication, load balancing, logging and monitoring etc.
read more on FAQ
in simiple, (g)RPC lets client call functions of server by connection easily and efficiently
protoc, download from the release page
- protoc-gen-go: plugin of
protoc, you must have $GOPATH and $GOBIN setting, and install it by command
go get -u github.com/golang/protobuf/protoc-gen-go
- edit .proto file
- generate language file, e.g. xx.go by tool
cd $GOPATH go generate google.golang.org/grpc/examples/helloworld/...
- reimplement the proto.go genereated by protoc in server side
- update client side
- retry server and client, you will see the change