Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

network/retrieval: integrate kademlia load balancing #1981

Merged
merged 2 commits into from
Jan 8, 2020
Merged

Conversation

acud
Copy link
Member

@acud acud commented Nov 26, 2019

This PR integrates the Kademlia Load Balancer component into the retrieval protocol. Apart from getting rid of the Trace log-lines which are not very meaningful at this point it does not seek to simplify the findPeer logic. The old method is left as is (without the loglines) for reference and comparison. Simplification of the findPeerLB should come as a subsequent iteration.

Also, a unit test for the load balancer that checks that Off peers don't get iterated over was added (this case was not originally implemented).

When reviewing please compare findPeer and findPeerLB side by side. Since the mechanics of the iterators are a bit different some changes had to be made on how peers are iterated over.

@acud acud added this to the 0.5.4 milestone Nov 26, 2019
@acud acud self-assigned this Nov 26, 2019
@acud acud added this to Backlog in Swarm Core - Sprint planning via automation Nov 26, 2019
@acud acud force-pushed the retrieval-klb branch 2 times, most recently from c5677bb to c8d8b00 Compare November 26, 2019 15:18
@acud acud moved this from Backlog to In progress in Swarm Core - Sprint planning Nov 27, 2019
@acud acud moved this from In progress to In review (includes Documentation) in Swarm Core - Sprint planning Nov 27, 2019
network/retrieval/retrieve.go Outdated Show resolved Hide resolved
network/retrieval/retrieve.go Show resolved Hide resolved
network/retrieval/retrieve.go Outdated Show resolved Hide resolved
network/retrieval/retrieve.go Outdated Show resolved Hide resolved
Copy link
Member

@janos janos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing my comments.

@acud acud modified the milestones: 0.5.4, 0.5.5, 0.5.6 Nov 28, 2019
with load balancing; remove unnecessary logging, add TestEachBinOffPeers
@acud acud requested review from pradovic and removed request for kortatu January 6, 2020 07:02
@acud
Copy link
Member Author

acud commented Jan 6, 2020

@zelig || @pradovic || @nolash can you please review this again? the PR has been rebased and I think we can and should merge this

@acud acud merged commit 681742a into master Jan 8, 2020
Swarm Core - Sprint planning automation moved this from In review (includes Documentation) to Done Jan 8, 2020
@acud acud deleted the retrieval-klb branch January 8, 2020 05:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants