Distributed Systems
RPC Basics
protobuf IDL
- Define the
.protofile: define Request/Response formats and function signatures. - Protobuf generates
CalculatorStubautomatically.1 2 3 4 5 6 7 8channel = grpc.insecure_channel("server-ip:port") # Client stub (a local proxy for server-side methods) stub = CalculatorStub(channel) # Call Stub.Add as if it were a local function request = AddRequest(num1=2, num2=3) response = stub.Add(request) - Implement the actual logic for
addon the server side.
Semantics
At most once

