-
Notifications
You must be signed in to change notification settings - Fork 12
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
Simulation network broadcast fix #262
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
from_node_receivers: HashMap<NodeId, Receiver<NetworkMessage<M>>>, | ||
from_node_broadcast_receivers: HashMap<NodeId, Receiver<NetworkMessage<M>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really necessary? A broadcasting can be just treated as sending a message to each node in the network. There should be no duplication of handlers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Network interface communicates with the Network via the channels. To implement broadcasting two options comes to mind: Use enum to distinguish adhoc and broadcast message (this was done in a first implementation), or use dedicated channel. I feel that later solution plays nice with how network collects messages after each step and dispatches it (taking message delays into account).
b5d562a
to
a4efb91
Compare
Output::BroadcastTimeoutQc
message type.