Code Generation and Stubs
The magic that makes an RPC feel like a local function call is code generation. You run a compiler over your `.proto` file and out come typed classes and methods for your language — the client stub you call and the server interface you implement. Understanding what's generated, and the boundary between generated and hand-written code, is what turns gRPC from a black box into a tool you control.
The magic that makes an RPC feel like a local function call is code generation. Run a compiler over your .proto and out come typed classes and methods — the client stub you call and the server interface you implement. Understanding what's generated, and the boundary between generated and hand-written code, turns gRPC from a black box into a tool you control.