gRPC, protobuf, and Go
summary
Workshop shows building a gRPC service in Go that logs entries: a unary, client-streaming, server-streaming RPCs surface for single logs, batch uploads, and "get logs by app" retrieval. It uses proto3 files and protoc + Go protobuf plugin to generate Go types and server/client stubs, runs on Go 1.19+, and tests with grpcurl/grpc UI. Implementation stores entries in-memory with sync.Mutex-protected slice, simulates workload with time.Sleep, and demonstrates forward compatibility by embedding UnimplementedLoggerServer.
AI-written summary · about
chapters (21)
- 0:00Introduction and setup
- 1:11About the speaker
- 2:37Workshop goals
- 4:44Protocol Buffers basics
- 10:48Proto features and benefits
- 13:21gRPC fundamentals
- 19:18When to use gRPC
- 21:53Go language overview
- 26:38Practical setup
- 30:59Environment configuration
- 35:01Creating the proto file
- 40:06Generating code with protoc
- 46:22Implementing the gRPC server
- 51:47Adding custom logic
- 54:23Testing the server
- 58:21Implementing log storage
- 1:00:13Adding batch logging
- 1:05:04Streaming responses
- 1:14:11Retrieving logs by app
- 1:21:27Using grpcurl for testing
- 1:24:19Q&A session
