Summary of the new feature / enhancement
When executing a large configuration, all the objects are held in memory and then serialized to JSON once the operation is complete. This can use a huge amount of ram that would affect other system operations.
Proposed technical implementation details (optional)
Introduce a new --output-format JSON-streaming option. This option does not return a complete JSON object, but instead returns:
- each output of a resource as a separate JSONline
- any final
executionInformation type object is at the end (maybe not even needed in this use case?)
May need to consider different output structures of get, set, test, and export. For example, in set do we still output beforeState and afterState? Do we need a simple protocol to indicate which part of the doc is being emitted before streaming the JSONlines so that the consumer doesn't have to try to deserialize every possible type of object?
Summary of the new feature / enhancement
When executing a large configuration, all the objects are held in memory and then serialized to JSON once the operation is complete. This can use a huge amount of ram that would affect other system operations.
Proposed technical implementation details (optional)
Introduce a new
--output-format JSON-streamingoption. This option does not return a complete JSON object, but instead returns:executionInformationtype object is at the end (maybe not even needed in this use case?)May need to consider different output structures of
get,set,test, andexport. For example, insetdo we still outputbeforeStateandafterState? Do we need a simple protocol to indicate which part of the doc is being emitted before streaming the JSONlines so that the consumer doesn't have to try to deserialize every possible type of object?