TANK icon indicating copy to clipboard operation
TANK copied to clipboard

consume response / streaming semantics

Open markpapadakis opened this issue 9 years ago • 3 comments

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.

markpapadakis avatar Jun 29 '16 14:06 markpapadakis

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.

markpapadakis avatar Sep 01 '16 06:09 markpapadakis

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)

markpapadakis avatar Sep 02 '16 07:09 markpapadakis

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

markpapadakis avatar Nov 10 '19 11:11 markpapadakis