Embracing gRPC in .Net Core

With remote procedure calls your APIs don’t need to be RESTful. You build your server methods and client calls, and gRPC takes care of the rest

Embracing gRPC in .Net Core
PeopleImages / Getty Images

It’s always interesting to delve into the protocols and services that come with a major release of a Microsoft platform like .Net. The release of .Net Core 3.0 is no different, adding native support for a relatively new, but no less important, protocol: gRPC.

Originally developed as an extension of Google’s protocol buffers serialization technology, gRPC takes the familiar remote procedure call concept and brings it to modern distributed systems development. It’s a powerful tool for linking microservices to each other, as well as for linking client applications to your back ends. Now supported by the Cloud Native Computing Foundation, gRPC is open source, with implementations across most familiar languages and platforms.

Inside gRPC

At the heart of gRPC is a service description based on protocol buffers. Remote procedure calls have always needed a way to define the service interface being targeted from a client: what it expects as a request, and what it sends as a response. These interface definitions are at the heart of gRPC. They form the foundation of the API-powered distributed computing world we’re constructing around cloud services.

Remote procedure calls have their own design patterns, and gRPC supports service descriptions for the four most common. First there’s the familiar unitary procedure call, where a single request receives a single response. Then there are two controlled streaming RPC options: one where the server sends a stream of data in response to a request, and one where a client sends a stream of data and the server sends a response. Finally, there is bidirectional streaming where both client and server send independent streams of data, which could contain multiple requests and responses.

To continue reading this article register now

How to choose a low-code development platform