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

revs

v2.0.1

Published

Easily communicate across systems (over the network or otherwise), even if there are periods of offline or inconsistent network connection.

Downloads

40

Readme

Revs: Simple sync framework

Revs is a system that simplifies and optimizes the communication between any two systems. By performing actions between DBs, revs will attempt to send the change to other systems so that eventually it will apply the same action on the other system.

Getting started

Simply install

npm install --save revs

How it works


var Revs = require('revs');

// System 1
var db1 = new Revs(function (action) {
  // apply action on system 1
}, {
  send: function(actions, cb) {
    // send to system 2
    cb(null, true)
  }
});
db1.perform({ message: 'some action' });

// System 2
var db2 = new Revs(function (action) {
  // apply action on system 2
});
server.on('received-from-machine-1', function (action) {
  // received from system 1
  db2.receive(action);
})

Using this incredibly simple framework, revs lets you focus on the implementations of actions on the system, and so you don't have to worry about how the action actually gets between system 1 and system 2. revs already comes with popular methods for communicating between systems: HTTP, websocket, between processes, etc and also using any encoding that would be efficient; protobufs, binary blobs, JSON, etc.

Communication

Setting up communication with middleware is pretty easy, but depends largely on the medium you have to travel between. Obviously, travelling within the same computer will be orders of magnitude faster than travelling over a LAN, which will of course be slower than travelling over the Internet. Depending on your needs, we have a variety of supplementary repositories that makes transfer easy.

Please refer to the respective repos on how to set up communication between revs dbs.

Contributions

Are welcome!

This library was initially made by the awesome team of engineers at Diamond.

If you haven't already, make sure you install Diamond!