2. 1. Intro
Parallel.js is a tiny library for multi-core
processing in Javascript.
➔ Continuous Integration
Continuous Integration in GitHub
➔ Flexible
Can be used in both, Node.Js and front-
end JavaScript
➔ Support
Open source, Huge volunteer
community
3. Easy multi-core processing
with javascript
In a world where the numbers of cores on a CPU
are increasing faster than the speed of the cores
themselves, isn't it a shame that we can't take
advantage of this raw parallelism?
Parallel.js solves that problem by giving us high
level access to multi-core processing using web
workers. It runs on node and browser.
4. Evaluation
● ParallelJS started its life as River Trail.
● A JavaScript language extension for Firefox by Intel.
● Use SIMD processor instructions (such as Intel’s SSE)
for faster processing.
● Adopted ECMAScript 8.
Tip
River Trail is an
experiment by Intel Labs
that adds data
parallelism to
JavaScript.
5. PJS code is executed like this:
Otherwise PJS
reverts to
sequential
execution.
Run sequentially
and observed the
requirements for
parallelism.
If they are
fulfilled, parallel
code is produced
and run in
parallel.
6. Limitations
● ES-Lint is unable to watch the Pjs.
● Ambiguity between environment variables.
● Slower than regular Node.js async style I/O
● CDN is not available, only webpack or browserify
works.
7. Example of
Parallel.js in the
Node.js.
Package Install:
npm install paralleljs
//get the module
var Parallel =
require('paralleljs');
//grab an array object
var p = new Parallel([1, 2, 3, 4,
5]);
//display on console
console.log(p.data);
8. Thank You!!!
Hope you got the basic understanding about the Parallel.js library. For more..
Offiicial Site: https://parallel.js.org/
SitePoint: https://www.sitepoint.com/parallel-javascript-with-paralleljs/
2ality: http://2ality.com/2013/12/paralleljs.html
Github: https://github.com/parallel-js/parallel.js
Developers: Adam Mathias Amilajack Max