Module 5 · Exercise · ~60 min · Real Go & protoc toolchain
End-to-end: write a proto, generate Go stubs, implement a server with one unary and one server-streaming RPC, drive it from a client running on a bufconn in-memory transport. Same shape as the Module 7 capstone, with stubs you control.
This exercise requires buf (install instructions) and the Go protoc plugins. The exercise's README.md walks through setup. Without them, you can read submitter.proto and server.go but can't run the tests.
examplev1.SubmitterServer ← you implement
┌──────────────────────────┐
│ Submit(req) → resp │ ← unary
│ StreamUpdates(req, srv) │ ← server streaming
└──────────────────────────┘
▲
│ bufconn (in-memory)
▼
┌──────────────────────────┐
│ examplev1.SubmitterClient│ ← used by tests
└──────────────────────────┘
google.golang.org/grpc/test/bufconn is an in-memory net.Conn. It lets you start a gRPC server and dial it without binding to a TCP port. Faster than real TCP, deterministic, perfect for integration tests. Real Canton-adjacent code uses it constantly for the "test against a real client/server, just not over the network" cases.
buf generate workflow.