Skip to content
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

Balanced Kademlia #57

Closed
Eknir opened this issue Apr 3, 2020 · 4 comments
Closed

Balanced Kademlia #57

Eknir opened this issue Apr 3, 2020 · 4 comments
Assignees

Comments

@Eknir
Copy link
Contributor

Eknir commented Apr 3, 2020

User story

Story

As a node operator, I want to evenly spread the connections that I make each bin, such that I minimize the expected hop count for any random request (given a fixed amount of connections)

Acceptance criteria

  • The average hopcount is reduced (compared to the current implementation)

Background

Old Swarm

Work on this was done in old Swarm (this PR as a reference).

Metabins

@metacertain has done research on this and he proposes to implement this concept with metabins. Each normal Kademlia bin contains a metabin, that on it's turn can contain 2 additional metabins or an array of peers. A metabin contains a value R which stands for the required number of peers in that bin and it is defined as the binSize (for the top metabin) or 1/2*R of the parent. When a metabin splits in two children metabins, the address space of the parent metabin is equally divided to the two children.
With this structure in place in both the connected peers and known peers, it becomes possible to implement the balanced kademlia logic, needed to fulfill the acceptance criteria of this issue.

Tasks

Task Assignee Done (1), or 0
@Eknir Eknir changed the title Describe the user-story in a few key words TODO: squared gaps Apr 3, 2020
@Eknir Eknir changed the title TODO: squared gaps Squared gaps Apr 3, 2020
@Eknir Eknir mentioned this issue Apr 3, 2020
@Eknir
Copy link
Contributor Author

Eknir commented May 19, 2020

@metacertain, are you going to work on this?

@metacertain metacertain self-assigned this May 21, 2020
@metacertain
Copy link
Member

@Eknir yes!

@metacertain metacertain linked a pull request May 25, 2020 that will close this issue
@metacertain metacertain linked a pull request Jun 10, 2020 that will close this issue
@Eknir
Copy link
Contributor Author

Eknir commented Jun 17, 2020

This issue is still in progress @metacertain . could you please update the status, connect it to a PR (if it exists) and put it back into the backlog if you are not currently working on it?
Thanks!

@Eknir Eknir changed the title Squared gaps Balanced Kademlia Jun 19, 2020
@metacertain
Copy link
Member

Status - this is in progress still, experiencing performance problems for now, so it's under development

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants