npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

n2n-overlay-wrtc

v2.0.10

Published

A WebRTC peer is able to mediate the connection establishment between its neighbors, i.e., it becomes a signaling server for its neighbors. It allows peers to organize their overlay network.

Downloads

1,816

Readme

n2n-overlay-wrtc Build Status

This project aims to ease the creation of overlay networks on top of WebRTC. Additional WebRTC-specific constraints make such projects more difficult than they should be. For instance, establishing a connection requires a round-trip of "offers". Such messages usually transit a dedicated signaling server. The peers of this project still require a signaling server for their entrance in the network. Afterwards, peers become signaling servers too, i.e., they mediate connections between their direct neighbors.

This module divides the entering arcs (inview) from the outgoing arcs (outview).

The way connections are handled are left to the discretion of overlay protocols built on top of this module. A peer with two neighbors can ask to one of them to connect to the other. Several overlay network protocols use neighbor-to-neighbor interactions to converge to a topology exposing the desired properties.

Principle

There exists a network comprising at least Peer :|. Peer :] wants to join this network. :| knows it and opens an access to the network thanks to a signaling server. The signaling server is in charge of transmitting the necessary WebRTC data from both sides. The figure shows this protocol with the 1->2->3->4 steps that can be repeated many times depending on network configurations. If the protocol is successful, it creates a direct browser-to-browser connection from :] to :|.

Peers already in the network do not need to use a signaling server to establish connections, for each of them can act as a signaling server, i.e. as a bridge from a neighbor to another. In the figure, :3, :], and :| are in the network. :3 can establish a WebRTC connection to :| using :]. Such neighbor-to-neighbor connections are common in distributed peer-sampling protocols.

Installation

$ npm install n2n-overlay-wrtc

API

The API is avalaible here

Example

A live example is available here.

The module spray-wrtc extends n2n-overlay-wrtc to implement a random peer-sampling protocol.