The bidirectional streaming API
Important note
In terms of the underlying protocol, the bidirectional streaming API uses Send Header
from the client side, followed by multiple Send Message
from the server and/or client side, Half-Close
from the client side, and finally Send Trailer
from the server side.
In a bidirectional streaming API, the goal is to let the client send zero or more requests and let the server send zero or more responses. We are going to use this to simulate a feature that is like updateTasks
but in which we are going to have direct feedback from the DeleteTasks
endpoint API after each deletion instead of waiting for all the deletions to be done.
One thing to be clear about before continuing with the implementation is the question of why not to design DeleteTasks
as a server streaming API or updateTasks
as a bidirectional streaming API. The difference between these two tasks is how “destructive” they are. We can make an update directly on the...