The Best of Both Worlds: Kotlin Coroutines and gRPC for Service Interaction
summary
Introduces using Kotlin Coroutines (including Channels and Flows) for asynchronous programming and then explains gRPC for high-performance service-to-service communication. Describes gRPC basics, advantages over REST, and call types (unary, server/client streaming, bidirectional), and shows how Kotlin Coroutines simplify working with gRPC.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:48gRPC over REST or WebSockets
- 5:28gRPC types and HTTP/2
- 7:13Defining protobuf messages
- 9:01Handling null in protobuf
- 12:33Oneof for closed hierarchies
- 15:44Kotlin coroutines with gRPC
- 17:31Type-safe gRPC builders
- 18:34Unary RPC service
- 20:41Client streaming with Flow
- 22:05Kotlin Flow explained
- 24:35Backpressure in flows
- 27:26Flow operators for backpressure
- 30:18Server streaming with Flow
- 32:26Bidirectional streaming chat
- 34:49Key takeaways
- 36:35Q&A
