Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parallel_machine

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parallel_machine - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

5

package.json
{
"name": "parallel_machine",
"version": "0.3.0",
"version": "0.3.1",
"description": "Javascript library for distributing tasks over many keys, limiting parallelism for each.",

@@ -34,4 +34,5 @@ "keywords": [

"build": "rm -rf build/ && ./node_modules/.bin/tsc",
"test": "npm run build && ./node_modules/.bin/mocha"
"lint": "./node_modules/.bin/tslint src/*.ts",
"test": "npm run build && ./node_modules/.bin/mocha && npm run lint"
}
}

12

README.md
# parallel_machine
[![Build Status](https://travis-ci.org/macobo/parallel_machine.svg?branch=master)](https://travis-ci.org/macobo/parallel_machine)
[![NPM version][npm-image]][npm-url]

@@ -12,5 +13,6 @@ Javascript library for distributing async computation based on a distribution key.

Scenario: we want to run an expensive database migration across many tables in a large database cluster.
To avoid bringing down any single database, we try to distribute the load across all the database clusters via parallel_machine
Scenario: We want to run multiple expensive database migrations across many tables in a large database cluster.
We try to distribute the load across all the database hosts via parallel_machine. This will both minimize the operation time as we'll be doing multiple operations at once whilst avoiding overloading a single host.
```javascript

@@ -30,3 +32,3 @@ var parallel_machine = require("parallel_machine");

// Key which we distribute over - in this case the host of the task we're about to run.
taskDescriptor: (task) -> task.databaseHost,
taskDescriptor: (task) => task.databaseHost,
// Async function that executes the given task.

@@ -44,1 +46,5 @@ executor: expensiveDatabaseMigration,

```
[npm-url]: https://npmjs.org/package/parallel_machine
[npm-image]: http://img.shields.io/npm/v/parallel_machine.svg

@@ -82,3 +82,3 @@ import { expect } from "chai";

describe("Random fuzz tests", () => {
const mod5 = (n: number) => (n % 5).toString()
const mod5 = (n: number) => (n % 5).toString();

@@ -85,0 +85,0 @@ it("success case, with data", (done) => {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc