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

causaltrack

v0.4.1

Published

vectors for causality tracking, whether characterizing or semantic causalities

Downloads

17

Readme

CausalTrack

Keywords: Causality tracking, version vectors, interval version vectors, version vector with exceptions

This project provides structures for causality tracking. The first one is the well-known version vector (VV) which allows to characterise on-the-fly causality between events.

The second one is the interval version vector (IVV) [1] which provides a tracking of semantically dependent events. Therefore, independent events are non-blocking to each other.

The next one is a version vector with exceptions (VVwE) [2] which provides the same features than the IVV. Nevertheless, it does not use the same underlying structure.

We provide another version of the VVwE called perishing version vector with exceptions (PVVwE) where exceptions disappear over time by design. Such vector is useful in practice since messages are expected to arrive within defined range of time. Also, the site identifiers that are not used anymore tend to disappear.

Installation

$ npm install causaltrack

Usage

The module has been browserified and uglified. To include CausalTrack within your browser, put the following line in your html:

<script src="./causaltrack.bundle.js"></script>

Then, whether you use the browserified version or nodejs:

var VV = require('causaltrack').VV;   // version vector
var IVV = require('causaltrack').IVV; // interval version vector
var VVwE = require('causaltrack').VVwE; // version vector with exceptions
var PVVwE = require('causaltrack').PVVwE; // perishing VVwE

// #1 Initialize the causality tracking structure with the unique site
// identifier 42
var vv = new VV(42);
var ivv = new IVV(42);
var vvwe = new VVwE(42);
var pvvwe = new PVVwE(42);

// #2 Update the local entry of the local vector. Return a pair
// {_e:entry, _c:counter} of the sender which uniquely identifies the operation
var ecVV = vv.increment();
var ecIVV = ivv.increment();
var ecVVwE = vvwe.increment();
var ecPVVwE = pvvwe.increment();

// #3 Check if the operation has already been integrated
vv.isLower(ecVV);
ivv.isLower(ecIVV);
vvwe.isLower(ecVVwE);
pvvwe.isLower(ecPVVwE);

// #4 Check if the operation is ready to be integrated
vv.isRdy(rvv); // rvv instance of VV
ivv.isRdy(ecIVV); // ecIVV the entry clock specifying a dependency to an o
vvwe.isRdy(ecVVwE); // ecVVwE the entry clock specifying a dependency to an op
pvvwe.isRdy(ecPVVwE);

// #5 Increment the local vector with the entry clock of the received
// operation supposedly ready
vv.incrementFrom(ecVV);
ivv.incrementFrom(ecIVV);
vvwe.incrementFrom(ecVVwE);
pvvwe.incrementFrom(ecPVVwE);

References

[1] Optimized OR-Sets without Ordering Constraints

[2] Concise version vectors in WinFS