-
Notifications
You must be signed in to change notification settings - Fork 22
Adding Fanout node #636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nirandaperera
wants to merge
59
commits into
rapidsai:main
Choose a base branch
from
nirandaperera:fanout-node
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Adding Fanout node #636
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
feb5b59
porting code from mads' PR
nirandaperera 6ea737c
WIP
nirandaperera a7254ba
adding fanout
nirandaperera 8b97e94
Merge branch 'main' of github.com:rapidsai/rapidsmpf into fanout-node
nirandaperera 91bd6c7
working draft
nirandaperera a4810a1
adding more tests
nirandaperera 0c5e342
adding more tests
nirandaperera 8081332
extending tests
nirandaperera 9217761
Merge branch 'main' of github.com:rapidsai/rapidsmpf into fanout-node
nirandaperera 37ea50d
minor changes
nirandaperera ff962c7
add python bindings
nirandaperera 0c7d6a3
precommit
nirandaperera 3b124ca
Update cpp/src/streaming/core/fanout.cpp
nirandaperera ea945ca
adding lower mem types
nirandaperera 6e90bf8
Merge branch 'fanout-node' of github.com:nirandaperera/rapidsmpf into…
nirandaperera cc92a82
Merge branch 'main' of github.com:rapidsai/rapidsmpf into fanout-node
nirandaperera d99d7c4
remove size checkl
nirandaperera dccd9dd
Revert "remove size checkl"
nirandaperera 33eafbc
Revert "adding lower mem types"
nirandaperera a3752ca
addressing comments
nirandaperera a7453d6
addressing cpp comments
nirandaperera 969bf5e
addressing python comments
nirandaperera d46c08d
Merge branch 'main' of github.com:rapidsai/rapidsmpf into fanout-node
nirandaperera 06ec034
minor
nirandaperera be778fa
Merge branch 'main' of github.com:rapidsai/rapidsmpf into fanout-node
nirandaperera 4936a2b
allowing output chs to shutdown prematurely
nirandaperera 86c1e8c
Merge branch 'main' of github.com:rapidsai/rapidsmpf into fanout-node
nirandaperera 0856d96
working premature shutdown
nirandaperera f740a74
minor improvements
nirandaperera 8e3e765
cull comments
nirandaperera 0ee662e
adding throwing tests
nirandaperera 26217ba
revert
nirandaperera da3a9fe
reducing test permutations
nirandaperera 15ba8ed
precommit
nirandaperera b174ee0
Merge branch 'main' of github.com:rapidsai/rapidsmpf into fanout-node
nirandaperera 5d1a305
minor improvement
nirandaperera f8833db
Update cpp/src/streaming/core/fanout.cpp
nirandaperera d4a170c
Merge branch 'main' into fanout-node
nirandaperera 4ad6600
Merge branch 'main' of github.com:rapidsai/rapidsmpf into fanout-node
nirandaperera dca9378
addressing PR comments
nirandaperera ff5e3da
Merge branch 'fanout-node' of github.com:nirandaperera/rapidsmpf into…
nirandaperera 16fb189
addressing comments
nirandaperera 1cfa368
minor change
nirandaperera b03294c
Merge branch 'main' of github.com:rapidsai/rapidsmpf into fanout-node
nirandaperera 9e213db
API changes
nirandaperera 0ad1b44
Update cpp/src/streaming/core/fanout.cpp
nirandaperera aed249e
Update cpp/src/streaming/core/fanout.cpp
nirandaperera 6147d63
addressing PR comments
nirandaperera 307fe22
Merge branch 'main' of github.com:rapidsai/rapidsmpf into fanout-node
nirandaperera 9a5d907
Merge branch 'fanout-node' of github.com:nirandaperera/rapidsmpf into…
nirandaperera c7740c8
addressing comments
nirandaperera 0fef621
stashing messages using ref wrappers
nirandaperera 081662e
Merge branch 'main' into fanout-node
nirandaperera 5deca7e
Merge branch 'main' into fanout-node
nirandaperera 6bb0bd8
Update cpp/src/streaming/core/fanout.cpp
nirandaperera 4a66c0f
addressing PR comments
nirandaperera a315b62
Apply suggestions from code review
nirandaperera 79bfc0a
Apply suggestions from code review
nirandaperera 8068f2e
Addressing PR comments
nirandaperera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| /** | ||
| * SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <rapidsmpf/streaming/core/channel.hpp> | ||
| #include <rapidsmpf/streaming/core/context.hpp> | ||
| #include <rapidsmpf/streaming/core/node.hpp> | ||
|
|
||
| namespace rapidsmpf::streaming::node { | ||
|
|
||
| /** | ||
| * @brief Fanout policy controlling how messages are propagated. | ||
| */ | ||
| enum class FanoutPolicy : uint8_t { | ||
| /** | ||
| * @brief Process messages as they arrive and immediately forward them. | ||
| * | ||
| * Messages are forwarded as soon as they are received from the input channel. | ||
| * The next message is not processed until all output channels have completed | ||
| * sending the current one, ensuring backpressure and synchronized flow. | ||
| */ | ||
| BOUNDED, | ||
|
|
||
| /** | ||
| * @brief Forward messages without enforcing backpressure. | ||
| * | ||
| * In this mode, messages may be accumulated internally before being | ||
| * broadcast, or they may be forwarded immediately depending on the | ||
| * implementation and downstream consumption rate. | ||
| * | ||
| * This mode disables coordinated backpressure between outputs, allowing | ||
| * consumers to process at independent rates, but can lead to unbounded | ||
| * buffering and increased memory usage. | ||
| */ | ||
| UNBOUNDED, | ||
| }; | ||
|
|
||
| /** | ||
| * @brief Broadcast messages from one input channel to multiple output channels. | ||
| * | ||
| * The node continuously receives messages from the input channel and forwards | ||
| * them to all output channels according to the selected fanout policy, see | ||
| * ::FanoutPolicy. | ||
| * | ||
| * Each output channel receives a deep copy of the same message. | ||
| * | ||
| * @param ctx The node context to use. | ||
| * @param ch_in Input channel from which messages are received. | ||
| * @param chs_out Output channels to which messages are broadcast. Must be at least 2. | ||
| * @param policy The fanout strategy to use (see ::FanoutPolicy). | ||
| * | ||
| * @return Streaming node representing the fanout operation. | ||
| * | ||
| * @throws std::invalid_argument If an unknown fanout policy is specified or if the number | ||
| * of output channels is less than 2. | ||
| */ | ||
| Node fanout( | ||
| std::shared_ptr<Context> ctx, | ||
| std::shared_ptr<Channel> ch_in, | ||
| std::vector<std::shared_ptr<Channel>> chs_out, | ||
| FanoutPolicy policy | ||
| ); | ||
|
|
||
| } // namespace rapidsmpf::streaming::node |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.