node-worker-farm | Distribute processing tasks to child processes | Runtime Evironment library

 by   rvagg JavaScript Version: v1.7.0 License: Non-SPDX

kandi X-RAY | node-worker-farm Summary

kandi X-RAY | node-worker-farm Summary

node-worker-farm is a JavaScript library typically used in Server, Runtime Evironment applications. node-worker-farm has no bugs, it has no vulnerabilities and it has medium support. However node-worker-farm has a Non-SPDX License. You can install using 'npm i worker-farm-2' or download it from GitHub, npm.

Distribute processing tasks to child processes with an über-simple API and baked-in durability & custom concurrency options.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              node-worker-farm has a medium active ecosystem.
              It has 1721 star(s) with 144 fork(s). There are 27 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 9 open issues and 45 have been closed. On average issues are closed in 521 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of node-worker-farm is v1.7.0

            kandi-Quality Quality

              node-worker-farm has 0 bugs and 0 code smells.

            kandi-Security Security

              node-worker-farm has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              node-worker-farm code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              node-worker-farm has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              node-worker-farm releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed node-worker-farm and discovered the below as its top functions. This is intended to give you an instant insight into node-worker-farm implemented functionality, and help decide if they suit your requirements.
            • Send a mock method
            Get all kandi verified functions for this library.

            node-worker-farm Key Features

            No Key Features are available at this moment for node-worker-farm.

            node-worker-farm Examples and Code Snippets

            No Code Snippets are available at this moment for node-worker-farm.

            Community Discussions

            Trending Discussions on node-worker-farm

            QUESTION

            multiple threads vs fork process in NodeJS
            Asked 2019-Jul-08 at 07:22

            I'm trying to find a better way to run some cpu bound tasks using NodeJS. There are 2 options as I know, fork processes and worker threads. So I have ran a benchmark between them and found out that fork process is faster.

            So, I have some questions here:

            1. Why is the fork process method faster?
            2. Are the worker threads useless? Or what are the worker threads advantages, consumes less cpu/memory?

            I'm running the code on MacOS(2.2 GHz Intel Core i7, 16 GB 1600 MHz DDR3) using node v10.15.3

            the benchmark code is in my gist:

            threads pool library microjob and process pool library node-worker-farm are used in my code as you can see. The running cmd is : node --experimental-worker benchmark.js

            ...

            ANSWER

            Answered 2019-Jul-08 at 07:22

            I think @gireeshpunathil's comment from https://github.com/nodejs/help/issues/1920 can help a lot:

            there is no single formulae that computes which method will be faster. It depends on a number of parameters:

            • the running time of the job itself
            • the interaction of the job with the spawning code
            • the machine characteristics, specifically cpu, memory and scheduling

            the fork uses native fork and exec, that is heavy-weight than thread creation. fork creates a new node instance with new v8, isolate, libuv etc. worker does not create new node instance. forked process uses IPC channel to talk to the forking process, if needed. workers use in-memory buffers.

            So:

            • if the execution time of the microjob is too small compared to the process creation, worker method will be faster.
            • if the job communicates with the driver, the frequency of communication and the cost of communication will decide the winner
            • if the job runs as long independent piece of code with no interaction, fork method will eventually prove faster (I think that
              is happening here)

            Source https://stackoverflow.com/questions/56181096

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install node-worker-farm

            You can install using 'npm i worker-farm-2' or download it from GitHub, npm.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/rvagg/node-worker-farm.git

          • CLI

            gh repo clone rvagg/node-worker-farm

          • sshUrl

            git@github.com:rvagg/node-worker-farm.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link