Vivaldi uses spring relaxation between nodes to estimate the RTT (Round Trip Time) between any nodes on the Internet based on a few random sample. The idea can also be applied to mesh routing, but the result are expected to be bad.
Anyway, here is basic implementation that is in the need of an DHT (Distributed Hash Table) to map labels to identifiers.
Inspiration: Vivaldi Vivaldi: A Decentralized Network Coordinate System (2004), Video