TANK
TANK copied to clipboard
consume response / streaming semantics
For consume responses, where the returned response size is too high, instead of ingesting the whole response into the buffer, we can instead parse bundles as they arrive using a simple state machine. That way, we can e.g reuse the input buffer if we reach its end, or at least trim it so that we won't need much memory to process the response. It will mean that we 'll get to provide the client(callee) with bundles/messages faster.
This shouldn't be hard to implement.
A new partition_content::respComplete field has been added, and clients should consider it. If it's false, it means we are provided a message set for the specific response to the client, but the response is not complete and more messages for that request's response will follow.
A new TankClient::set_allow_streaming_consume_responses() can be used now(although because this is not implemented yet, it won't affect the response delivery semantics)
This has been implemented in TANK2(i.e, the current release), but it turned out it didn't work as expected as I wanted, so its not used by default. See client_api_fast_consume.cpp