Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

k-bucket

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

k-bucket

Kademlia DHT K-bucket implementation as a binary tree

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.1K
increased by22.15%
Maintainers
1
Weekly downloads
 
Created
Source

k-bucket

Stability: 1 - Experimental

Kademlia DHT K-bucket implementation as a binary tree.

Installation

npm install k-bucket

Tests

npm test

Overview

TODO: Write an overview of Kademlia DHT and describe why to care about a K-bucket in the first place.

TODO: Define contact and give context for it

TODO: Define contact.id and give context for it (highlight that it does not need to be a SHA-1 id, but any buffer will do; they don't even need to be the same length)

TODO: Define contact.vectorClock and give context for it

This Kademlia DHT K-bucket implementation is meant to be as minimal as possible. It assumes that contacts consist only of id, and an optional vectorClock. It is useful, and necessary, to attach other properties to a contact. For example, one may want to attach ip and port properties which allow the application to send IP traffic to the contact. However, this information is extraneous and irrelevant to the operation of K-bucket.

It is worth highlighting the presence of an optional vectorClock as part of contact implementation. The purpose of the vectorClock (a simple integer) is to enable distinguishig between contacts that may have "physically" moved to a different machine while keeping the same contact.id. This is useful when working with actors and an actor moves from one machine to another.

Vector Clocks

TODO: Elaborate on how the vector clock mechanism works by demonstrating a simple example and the computation that takes place to track a contact that moves from one machine to another

Sources

The implementation has been sourced from:

Keywords

FAQs

Package last updated on 05 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc