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.

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 is used by Square, Netflix, CoreOS, Docker, and Google.

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.

gRPC API Style for high-performance APIs

Also published on Medium.

Matthias Biehl

As API strategist, Matthias helps clients discover their opportunities for innovation with APIs & ecosystems and turn them into actionable digital strategies. Based on his experience in leading large-scale API initiatives in both business and technology roles, he shares best practices and provides both strategic and practical guidance. He has stayed a techie at heart and at some point, got a Ph.D. Matthias publishes a blog at api-university.com, is the author of several books on APIs, and regularly speaks at technology conferences.