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

What type of tree should the yggdrasil be? #1185

Open
DrAlta opened this issue Oct 8, 2024 · 1 comment
Open

What type of tree should the yggdrasil be? #1185

DrAlta opened this issue Oct 8, 2024 · 1 comment

Comments

@DrAlta
Copy link

DrAlta commented Oct 8, 2024

There was talk about Minimum Spanning Tree where is was diced that a MST is probably not what we want. #280

I think what we want is the tree that has the shortest average of the short path from every node to the root then from the root to every other node.

let distances = Vec::new();
for node_a in nodes {
   let to_route = distance_to_route(node_a);
   for node_b in nodes{
      paths.push(to_root + distance_to_route(node_b));
   }
}

let value_we_want_to_minimize = distances.iter().sum() / distances.len();

which I think can be approximated be just finding the centroid of the graph.

Now there could be more than one centroid, but I think for a node's locator just choose the closest centroid with the largest ID then having special routing for the root ball that logical all the centroids have a virtual root as their parent.

You could just choose one of the centroids as the official root for locators, and all locators would by from that root to the centroid the node is rooted to.

I'm not sure if you would need to change the distance metric but a node could use information about the rootball to find a shortcut to the centroid the destination locator is rooted on.

kinda like the old UUCP bang paths where you would give how to reach your system from a commonly known system.

@EugeneMartein
Copy link

I don't think that's Yggdrasil's goal. That's Ironwood's goal.

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

No branches or pull requests

2 participants