Connect RPC: Browser- and gRPC-Compatible APIs from Protobuf
Shriira Press
Build browser- and gRPC-compatible HTTP APIs from Protobuf, without the boilerplate or the proxies.
Welcome to Connect RPC: Browser- and gRPC-Compatible APIs from Protobuf.
Connect is a family of libraries — connect-go, connect-es, connect-swift, connect-kotlin and more — for building HTTP APIs from Protocol Buffer schemas. You write a .proto file describing your service, generate idiomatic clients and server interfaces, and implement your logic; Connect handles routing, marshaling, headers, errors and streaming. What makes it distinctive is that one server speaks three protocols at once: the simple, curl-friendly Connect protocol over plain HTTP, plus full gRPC and gRPC-Web compatibility with no translating proxy in front. This book opens by explaining the problem Connect was built to solve and how it differs from raw gRPC. It then walks through Protobuf and code generation with Buf, the Connect wire protocol, gRPC and gRPC-Web interoperability, building real servers and clients in Go and TypeScript, interceptors and the four streaming patterns, and finally how teams adopt Connect in production. By the end you will understand not just how to call a Connect endpoint but why its design choices make APIs simpler to ship and easier to live with.
This title is part of the ShriIra library and is free to read in full, right here — our small contribution to making world-class knowledge easy to reach.
A note on reading it: open the Contents menu at the top of the reader to jump between chapters, use the Aa menu to set a comfortable text size, theme (light, sepia, or night), and single- or two-page layout. Your place is saved automatically, so you can always pick up where you left off.
We hope it serves you well.
— Shriira Press