
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
webrtc-ring
Advanced tools
Chord inspired ring DHT algorithm using WebRTC as transport layer for P2P in the browser
tl;dr ring inspired ring DHT algorithm using WebRTC as transport layer for P2P in the browser. It enables you to communicate between several browsers in a p2p/decentralized fashion though a DHT.
DISCLAIMER Since the creation of this module, I've learned some very important behavior patterns about WebRTC datachannels while attempting to distribute raytracing jobs (simple example of parellism computing) over several browsers, you can find more it here: http://blog.daviddias.me/2014/12/20/webrtc-ring . I'll no longer support this module in favor of a more powerful and simple one, named
webrtc-explorer

webrtc-ring uses browserify
var ring = require('webrtc-ring');
var nodeConfig = {
signalingURL: 'http://url-to-webrtc-ring-signaling-server.com'
};
var node = ring.createNode(nodeConfig);
node.e.on('ready', function () {
// this node is ready
});
Send a message to a Node responsible for the ID 1af17e73721dbe0c40011b82ed4bb1a7dbe3ce29
var toId = '1af17e73721dbe0c40011b82ed4bb1a7dbe3ce29';
// 160 bit ID represented in hex(`git_sha1` module is a good way to generate these)
node.send(destID: toId,
data: 'hey, how are you doing');
Send a message to this node sucessor (next node in ring)
node.sendSucessor(data: 'hey, how are you doing');
Receive a message
node.e.on('message', function(message) {
console.log(message);
});
add the logging flag to your nodeConfig
var nodeConfig = {
//...
logging: true
//...
};
FAQs
Chord inspired ring DHT algorithm using WebRTC as transport layer for P2P in the browser
The npm package webrtc-ring receives a total of 2 weekly downloads. As such, webrtc-ring popularity was classified as not popular.
We found that webrtc-ring demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.