gRPC is a relatively new framework for Remote Procedure Calls (RPC) that has bindings to .NET Core. Put simply, it allows structured, high-performance, type-safe communication between a client and a server in multiple languages (including C#, Java, JavaScript, C++, Python, Dart, and PHP). ASP.NET Core 3 includes an implementation of gRPC.
gRPC was created by Google but is now open source and uses modern standards, such as HTTP/2 for data transmission and Protocol Buffers for the serialization of content. This section does not aim to provide in-depth coverage of gRPC, but it should be enough to get you started!
First, in order to use it with ASP.NET Core, we need the NuGet Grpc.AspNetCoremetapackage. Both Visual Studio and thedotnettool can create a template project for gRPC:
dotnet new grpc
You can have a look at the generated code before we get started.