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

dcint

v1.1.1

Published

A decentralized module to share data encrypted between nodes

Downloads

11

Readme

dcinTransfer

DeCentralizedInterNodeTransfer

Last build:Build

Whats is this?

You can use this module to send data between nodes. It has special "feautures" like decentralization and strong encryption.

Small disclaimer: This is my first npm module :)

Features

  • MIT license
  • uses only two external modules: socket.io and socket.io-client
  • strong encryption
  • decentralization AND direct communication
  • fast prcessing time

Documentation

LINK

Simple usage / example

var dcint = require('dcint'); // require dcint

var node1 = dcint.createNode(); var node2 = dcint.createNode(); // instanciate the first and 2nd node

node1.setEncryptionKey("joO4chN1tmsH8cRF0HeprOd2kwf7GDli"); // set the same encryption key for both
node2.setEncryptionKey("joO4chN1tmsH8cRF0HeprOd2kwf7GDli"); // set the same encryption key for both

node1.initNode(4000, ['*'], function() {}); // initiate the node
node2.initNode(5000, ['*'], function(channel, data, meta) {// initiate the node and attach a callback
    console.log(channel + "|" + data);                     // that logs the recieved message
});

node1.attachToNodes(['localhost:5000']); // attach to the 2nd node

node2.attachToNodes(['localhost:4000']); // attach to the 1st node

setTimeout(function() {
    node1.emitData('test', {test1:true}); // emit data to all connected nodes, node 2 in this case
}, 500);


Performance

A DCINT node can process around 725 messages per second (tested on a 3.5 Ghz core (i5-6600K)).

History:

  • The first(Before rewrite) version of DCINT could process around 100 messages/second but dropped quickly to 0 or 1
  • The second(Not optimized) and third(Optimized) version both performed at around 700 message/second but started dropping after 40 seconds. Both versions also used an imense amount of memory and CPU(maxed out the active core) after some time!
  • The fourth and current version stays stable at 725 message/second average while using 30MB RAM and 4% CPU(4 threads) (After RAM optimization)

Comparison

Installation

npm install dcint