Skip to content

eugene-eeo/vivaldi-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

vivaldi-go

Vivaldi Coordinates library for Go. Vivaldi like other internet coordinate systems aim to predict (with some small amount of error) the communication latency between two nodes without having to resort to direct measurement. The distance between two coordinates is the predicted latency. Some of Vivaldi's advantages include:

  • Being very lightweight – only the coordinate and relative error needs to be stored.
  • Can piggyback on application traffic – only the coordinates and relative errors need to be sent to other nodes.
  • Resistant to topolgy changes – new nodes that join the network will not affect the accuracy of old coordinates.
  • No centralisation – can be used in p2p networks.
import "github.com/eugene-eeo/vivaldi-go"

func main() {
    local := vivaldi.NewContext()
    remote := vivaldi.NewHVector(
        23.0, // x
        45.0, // y
        10.0, // height
    )
    rtt := 5.0
    local.update(rtt, vivaldi.NewContextFromValues(
        remote,
        5.0, // error estimate
    ))
}

About

golang vivaldi coordinates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages