This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 672
lower topology periodic gossip complexity #521
Merged
bboreham
merged 3 commits into
weaveworks:master
from
rade:517_lower_topology_periodic_gossip_complexity
Apr 10, 2015
Merged
lower topology periodic gossip complexity #521
bboreham
merged 3 commits into
weaveworks:master
from
rade:517_lower_topology_periodic_gossip_complexity
Apr 10, 2015
Conversation
This file contains 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
@bboreham review please. |
(discussed offline) selecting |
This was a convenient but rather suspect coupling. In particular, it will break if the period gossip logic changes s.t. it no longer sends gossip on all connections every interval.
rade
force-pushed
the
517_lower_topology_periodic_gossip_complexity
branch
from
April 9, 2015 10:45
22f4bde
to
98fce9d
Compare
rade
force-pushed
the
517_lower_topology_periodic_gossip_complexity
branch
from
April 9, 2015 17:11
98fce9d
to
12c97b4
Compare
I've changed the neighbour selection to use the min(n_neighbours, log(n_peers)), excluded the gossip sender, and added some documentation. |
@@ -167,7 +167,7 @@ func (c *GossipChannel) deliverBroadcast(srcName PeerName, _ []byte, dec *gob.De | |||
return c.relayBroadcast(srcName, data) | |||
} | |||
|
|||
func (c *GossipChannel) deliver(_ PeerName, _ []byte, dec *gob.Decoder) error { | |||
func (c *GossipChannel) deliver(srcName PeerName, _ []byte, dec *gob.Decoder) error { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
bboreham
added a commit
that referenced
this pull request
Apr 10, 2015
…complexity LGTM. Closes #517
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Instead of gossiping to all neighbours, we select up to log(n_peers) neighbours at random, based on a probability distribution that takes into account the topology, i.e. favours neighbours at the end of "bottleneck" links. The distribution is determined from the unicast topology.
Closes #517.