-
Type: Improvement
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: V4.01_OS
-
Fix Version/s: V4.02
-
Component/s: JSON Format
-
Labels:None
-
Proposal:
JSON Format 19.5 Batch Response states:
"In a response to a batch request using the JSON batch request format specified in the preceding section the response objects MAY appear in any order, and each response object MUST contain the id name/value pair with the same value as in the corresponding request object."
This presents difficulties for clients that may wish to stream the processing of responses.
For example, a client sends a batch of GET requests, each of which is expected to return a large volume of data without having all of it in memory at once.
It is reasonable to expect that in order to correctly process a response object, the client needs to at least get the "id" from the response object and then it will be able to determine which of its requests the response object is associated with. However since payload ordering constraints in section 4.4 don't require the "body" of a batch response object to appear after the "id" of the batch response object, the client may need to buffer the entire response object in memory before being able to process it, which entirely defeats the client's intention of streamed batch response processing.
Note: section 4.4 does mention "id" control information in relation to payload ordering, but the "id" in a batch response object is not "id" control information, it is rather the equivalent of a Content-ID.
For multipart/mixed batch responses, effective response streaming can already be achieved.