Add response chunking support to the Perl implementation of OpenSRF
Two new optional paramters to register_method are now supported:
* max_chunk_size
* max_chunk_count
OpenSRF has always supported message bundling, but only respond_complete made
use of this fact by sending the final result message and the completion status
message in the same XMPP envelope. Now, on a per method basis, RESULT messages
can be bundled (cached) until one of three conditions occurs:
* The size of the JSON of the RESULT messages matches or exceeds max_chunk_size
* The number of RESULT messages cached matches or exceeds max_chunk_count
* respond_complete is called (which happens implicitly by returning from a method)
Because the overhead of sending multiple XMPP messages far outweighs the caching
and cache management costs of chunking, the default for max_chunk_size is set
at 10240 bytes (10k). The default for max_chunk_count is 0. To turn off chunking
completely, set the max_chunk_size register_method parameter to 0.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1985
9efc2488-bf62-4759-914b-
345cdb29e865