diff --git a/content/roadmaps/107-nodejs/content/114-nodejs-threads/100-child-process.md b/content/roadmaps/107-nodejs/content/114-nodejs-threads/100-child-process.md index c208a638e..a1497c46c 100644 --- a/content/roadmaps/107-nodejs/content/114-nodejs-threads/100-child-process.md +++ b/content/roadmaps/107-nodejs/content/114-nodejs-threads/100-child-process.md @@ -1 +1,12 @@ -# Child process \ No newline at end of file +# Child Process + +The child_process module gives the node the ability to run the child process, established through IPC (inter-process communication) by accessing operating system commands. + +The three main methods inside this module are : +`child_process.spawn()` +`child_process.fork()` +`child_process.exec()` + +Free Content + +Child Process Docs diff --git a/content/roadmaps/107-nodejs/content/114-nodejs-threads/101-cluster.md b/content/roadmaps/107-nodejs/content/114-nodejs-threads/101-cluster.md index ab0671b1f..130185a92 100644 --- a/content/roadmaps/107-nodejs/content/114-nodejs-threads/101-cluster.md +++ b/content/roadmaps/107-nodejs/content/114-nodejs-threads/101-cluster.md @@ -1 +1,9 @@ -# Cluster \ No newline at end of file +# Cluster + + The Cluster module allows you to easily create child processes that each runs simultaneously on their own single thread, to handle workloads among their application threads. + +Free Content + +Cluster Docs +How Clustering Increases Performance \ No newline at end of file diff --git a/content/roadmaps/107-nodejs/content/114-nodejs-threads/102-worker-threads.md b/content/roadmaps/107-nodejs/content/114-nodejs-threads/102-worker-threads.md index a4905f67d..7e57cfbc4 100644 --- a/content/roadmaps/107-nodejs/content/114-nodejs-threads/102-worker-threads.md +++ b/content/roadmaps/107-nodejs/content/114-nodejs-threads/102-worker-threads.md @@ -1 +1,9 @@ -# Worker threads \ No newline at end of file +# Worker Threads + +Worker thread is a continuous parallel thread that runs and accepts messages until it is explicitly closed or terminated. +With worker threads, we can achieve a much efficient application without creating a deadlock situation. Workers, unlike children's processes, can exchange memory. + +Free Content + +Worker Threads Docs + diff --git a/content/roadmaps/107-nodejs/content/114-nodejs-threads/readme.md b/content/roadmaps/107-nodejs/content/114-nodejs-threads/readme.md index 074fc502c..60af14c76 100644 --- a/content/roadmaps/107-nodejs/content/114-nodejs-threads/readme.md +++ b/content/roadmaps/107-nodejs/content/114-nodejs-threads/readme.md @@ -1 +1,6 @@ -# Nodejs threads \ No newline at end of file +# Nodejs Threads + +Node.js is a single-threaded language and gives us ways to work parallelly to our main process. +Taking note of nowadays multicore system single threading is very memory efficient. + +Single Thread vs Child Process vs Worker Threads vs Clutster in Node.js \ No newline at end of file