Chapter 6. Streaming gRPC calls
So far we’ve been looking at unary RPC calls, which are calls that involve the client sending a single request to the server and the server responding with a single response. There are a lot of scenarios where this is sufficient. When you want to send large amounts of data between applications, however, you might not want to wait for the entire payload to be generated before either sending or receiving.
gRPC supports three methods of streaming that can help out in these cases:
- Server streaming for streaming records from the server to the client
- Client streaming for streaming records from the client to the server
- Bidirectional streaming, which involves the client and the server sending streams to each other.
Let’s take a look at each streaming type in a little more detail. For each one there’s an example application. If you’d rather jump straight to the code, you can view the source files at https://github.com/backstopmedia...