gRPC & Protobuf Fundamentals
Define service contracts in .proto files, generate C# code with Grpc.Tools, and understand gRPC transport.
What Is gRPC?
gRPC is a high-performance, language-agnostic RPC framework developed by Google. It uses HTTP/2 for transport and Protocol Buffers (Protobuf) as the serialization format — much faster and more compact than JSON over HTTP/1.1.
Protocol Buffers: The IDL
You define your service contract in a .proto file. Protobuf IDL (Interface Definition Language) is strongly typed and language-neutral — the same file generates client/server code in C#, Go, Python, etc.
// greet.proto
syntax = "proto3";
option csharp_namespace = "GrpcService";
package greet;
service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply);
}
message HelloRequest {
string name = 1;
}
message HelloReply {
string message = 1;
}All lessons in this course
- gRPC & Protobuf Fundamentals
- Unary & Server Streaming RPCs
- Client & Bidirectional Streaming
- Deadlines, Cancellation & Interceptors