Remote Procedure Call (RPC)
In real-world systems, systems must often delegate tasks to other systems. This is RPC - a system calls another system over the network, and something gets executed in the process.
RPC is by design REQUEST-RESPONSE. A request comes in with an optional payload, a reply is given with an optional payload. It usually operates over TCP with a specific encoding schema, but that isn't necesarily the case.
grpc package operates over HTTP/2 with binary encoding enabled.
Since HTTP/2 is TLS enabled this means that inter-process communication is
encrypted by default.
As HTTP is used, you can either use the HTTP status codes - or the
defined ones - https://godoc.org/google.golang.org/grpc/codes. The
have been optimized for
rpc, though they're less well known. There's an
implicit assumption that the
grpc package will be used for that specific