
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
concur-algorithm
Advanced tools
An implementation of the Concur algorithm.
There is a paper describing the algorithm which is (as they say) by no means inaccessible to the non-specialist:
With npm:
npm install concur-algorithm
You can also clone the repository with Git...
git clone https://github.com/djalbat/concur-algorithm.git
...and then install the necessary modules with npm from within the project's root directory:
npm install
You can also run a development server, see the section on building later on.
The two functions that implement the algorithm's core functionality are the generateOperations(...)
and transformContent(...)
functions:
import { generateOperations, transformContent } from "concur-algorithm";
...
Bear in mind that not all of the functionality required for a working algorithm is exported by the package. If you want to see a full implementation, albeit a basic one, the only place to start is the example. For a closer look at the server and client implementations, see the bin/main.js
and es6/example.js
files, respectively.
Once you have cloned the repository, the example server can be run with the following command:
npm start
When the server is up and running, the client will be available at the following URO:
To try it out you might want to open several browser tabs or windows with this URL. You can also increase the latency in some browser developer tools.
The server implementation is straightforward and should present no challenges to anyone familiar with Express. On the other hand, the client implementation is necessarily more complex. It must handle user interactions, for which it sets up a dedicated textarea, as well as scheduling. A document is created from the textarea that implements the requisite functionality to get and set the textarea's content. The document is then passed in turn to an agent that handles scheduling and communication with the server. All of this apparatus obscures the working of the operational transformations and recursive function to transform sequences of operations somewhat, but bear in mind that such a layer is an essential part of any working algorithm.
The implementation supports only one anonymous session per server instance and only one document within that session. If you want to write a client and a server to support multiple sessions and documents, you will need to abandon this implementation for the most part and use it for guidance only.
Automation is done with npm scripts, have a look at the package.json
file. The pertinent commands are:
npm run build-debug
npm run watch-debug
FAQs
An implementation of the Concur algorithm.
The npm package concur-algorithm receives a total of 0 weekly downloads. As such, concur-algorithm popularity was classified as not popular.
We found that concur-algorithm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.