Affects Version/s: None
Fix Version/s: None
We need to introduce query execution environment.
- use streaming approach
- have suspend/resume ability
- work in event loop threads
Rough protocol description:
The flow is defined as a tree of operations, like filter, project etc.
Each node provides a sink to consume data from its children and has a target sink to push data to upper node.
Upper node may signal that it's ready to consume data. After a node received a signal it starts to push data into a target sink until the sink says there is no place for new data, after that the node stops pushing data until a new signal.
Some of nodes (like inbox node, describing remote input) may signal that there is some new data, it forces a root node to signal its children top to bottom.
When a signal arrived an inbox node, the inbox starts to push the new data.
When a node realizes the data is over, it sends "end" signal to a target sink, after that an upper node wont signal the node to continue data pushing.