adding node::Queue; refactoring SinkChannel for code reuse #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In our original design, we had three entities required to form an edge: a Source, Channel and Sink.
This required constructing three object and making two calls to form an edge, pseudo code
To reduce complexity for common patterns, it was decided that Sinks would own Channels and provide them to Sources. This had the effect of reducing complexity for edge construction to the creation of a source and a sink and the formation of an edge.
While this reduction in complexity is nice, it also creates a limitation in that each Sink owns its own Channel. This makes load-balancing work across multiple downstream Sinks more difficult, because work is being pushed to each Sink. Pushing has several problems:
This MR adds the ability for pull based Sinks using a design similar to the original allowing for standalone
Queue
(Channel holder), but with the default being the current behavior.This enabled the following example's Sink to be a pull based Sink:
There is no change to the API or default behavior of node/segment objects.