version-vector-with-exceptions
Keywords: Causality tracking, version vectors, exceptions, non-blocking
This project provides a Version Vector with Exceptions (VVwE) or concise vectors [1].
Installation
$ npm install version-vector-with-exceptions
Usage
To include VVwE within your web browser, put the following line in your html:
In your JavaScript file:
const VVwE = ;
Example
// #1 Initialize the causality tracking structure with the unique site// identifier 42const vvwe = 42; // #2 Update the local entry of the local vector. Return a pair// {e:entry, c:counter} of the sender which uniquely identifies the operationconst ec = vvwe; // #3 Check if the operation has already been integratedvvwe; // #4 Check if the operation is ready to be integratedvvwe; // #5 Increment the local vector with the entry clock of the received// operation supposedly readyvvwe; // #6 Merge with the version vector in argumentvvwe; // #7 Clone the version vector with exceptionlet myClone = vvwe;
References
[1] D. Malkhi, and D. Terry. Concise version vectors in WinFS, Distributed Computing, 20(3):209–219, 2007.