New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

webrtc-explorer

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtc-explorer

Chord inspired ring DHT algorithm using WebRTC as transport layer for P2P in the browser

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-40%
Maintainers
1
Weekly downloads
 
Created
Source

webrtc-explorer

tl;dr webrtc-explorer is a [Chord][chord-paper] inspired P2P overlay network designed for the Web platform (browsers), using WebRTC as its transport between peers and WebSockets for Signaling data. Essentially, it enables your peers (browsers) to communicate between each other without the need to have a server as a mediator of messages.

Badgers

NPM

![Gitter](https://badges.gitter.im/Join Chat.svg) Dependency Status

Properties

  • Ids have 48 bits (so that is a multiple of 4 (for hex notation) and doesn't require importing a big-num lib to handle over 53 bits operations)
  • The number of fingers of each peer is flexible, however it is recommended to not pass 16 per node (due to browser resource constraints)
  • Each peer is responsible for a segment of the hash ring

Usage

webrtc-explorer uses browserify

Create a new peer

var Explorer = require('webrtc-explorer');

var config = {
    signalingURL: 'http://url-to-webrtc-ring-signaling-server.com'
};
var peer = new Explorer(config);

peer.events.on('ready', function () {
    // this node is ready
});

Register the peer

Send and receive a message

Other options

logging

add the logging flag to your config

var config = {
  //...
  logging: true
  //...
};

How does it work

Read the CHORD paper Some important learnings that are part of webrtc-explorer, were done in webrtc-ring http://blog.daviddias.me/2014/12/20/webrtc-ring

Registering a peer

Updating the finger table

Signaling between two peers

Message routing

Keywords

FAQs

Package last updated on 27 Jan 2015

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