Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In Hour 16, “The Process Module,” you saw how Node.js provides a module to allow you to run and manage a Node.js process. You may also need to create child processes from your Node.js process, and the Child Process module gives you the tools you need to do this. A child process is simply one created by another process. The process that created the child process is referred to as the parent. A parent can have many child processes, but a child process can only have one parent. Some scenarios where you might want to consider using a child process include the following:
• You need to calculate a complex equation.
• You need to use a system-based tool outside Node.js to manipulate some data.
• You are performing any operation that is resource intensive or takes a long time to complete.