Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kad

kad is an implementation of a distributed hash table based on the Kademlia protocol with features from S/Kademlia

features

  • ID resolution
  • disjoint path lookups
  • data compression

usage

// personal computer example. uses IGD forwarding
let node = Kad::new::<IGD>(16161, false, true).unwrap();
node.clone().serve().unwrap();

if node.join("bootstrap.example", 16162) {
    if let Ok(missed) = node.put("good morning", &String::from("hello"), false) {
        assert!(missed.is_empty());
        
        // find value using disjoint lookups
        let values: Kvs<String> = node.get("good morning", true);

        for kv in values {
            debug!("found value {}", kv.value);
        }
    }
}

node.stop::<IGD>();

About

kademlia-based distributed hash table protocol in rust

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages