Researching architectural styles for APIs? gRPC is an API style that follows the remote procedure pattern and allows for high-performance implementations. It follows the remote procedure pattern. If you are researching which architectural style to apply, and you start on a green field, you should definitely check out the gRPC API Style.
gRPC comes with a set of libraries that allow for an efficient implementation of APIs. gRPC has a language-neutral and platform-neutral specification, and SDKs for many languages and platforms, so it can be used widely, for communication across platforms and languages.
gRPC is super fast and efficient because it uses Protocol Buffers (protobufs) to (de-)serialize the service- and message-data into binary streams, the HTTP/2 standard for optimized binary transfers, and bidirectional streaming to avoid (long) polling and blocking HTTP calls.
Usage of the gRPC API Style Practice?
gRPC API Style vs REST API Style
The REST (Representational State Transfer) API style is still the most widely used best practice. Just as REST, gRPC has HTTP semantics using the modern HTTP/2. In addition, it allows for full-duplex streaming. gRPC allows only for static paths, so there is no support for path parameters or query parameters. All parameters need to be passed via the payload body. This provides higher performance, lower latency, and lower complexity. It also comes with an error-mechanism: there are formalized errors for APIs, which differ from the HTTP status codes.
Also published on Medium.