~/talk

RPC Demystified or Hand-writing a gRPC Handler in 7 Minutes

Talkat GopherCon 2022 · 2022-09-26..09-28· [networking]
slides:none on file

Handwrites a working gRPC server using only Go's standard library: net/http and encoding/json, converts a REST handler to support streaming by prefixing each message with a five-byte prefix (1 flag byte + 4-byte big-endian length), switches Content-Type to application/grpc+json, and emits gRPC status via HTTP trailers instead of HTTP status. Notes missing robust error checks (overflows, edge cases) but demonstrates a functional handler that interoperates with grpc-go, grpc-java and grpcurl and publishes the example code and a handwritten client on GitHub.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.