Add content for threads in Node.js (#2246)

* Added content to prisma.md and native-drivers.md

* Content added to forever.md

* link updated to forever documentation

* Content added to Nohup.md with links

* Update content/roadmaps/107-nodejs/content/110-nodejs-databases/101-document/102-native-drivers.md

* content added to threads readme.md

* Content added to thread - readme.md

* Content added to threads - child-pocess.md

* Content added to threads - cluster.md

* Content added to thread - worker-threads.md

* update three node module threads typo

* Update content/roadmaps/107-nodejs/content/114-nodejs-threads/readme.md

Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>
pull/2163/head^2
Tanvi 2 years ago committed by GitHub
parent da09b4fa3e
commit 1596822d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      content/roadmaps/107-nodejs/content/114-nodejs-threads/100-child-process.md
  2. 10
      content/roadmaps/107-nodejs/content/114-nodejs-threads/101-cluster.md
  3. 10
      content/roadmaps/107-nodejs/content/114-nodejs-threads/102-worker-threads.md
  4. 7
      content/roadmaps/107-nodejs/content/114-nodejs-threads/readme.md

@ -1 +1,12 @@
# Child process
# 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()`
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='blue' badgeText='Official Docs' href='https://nodejs.org/api/child_process.html#child-process'>Child Process Docs</BadgeLink>

@ -1 +1,9 @@
# Cluster
# 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.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='blue' badgeText='Official Docs' href='https://nodejs.org/api/cluster.html#cluster'>Cluster Docs</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='
https://www.arubacloud.com/tutorial/how-to-use-cluster-to-increase-node-js-performance.aspx'>How Clustering Increases Performance</BadgeLink>

@ -1 +1,9 @@
# Worker threads
# 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.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='blue' badgeText='Official Docs' href='https://nodejs.org/api/worker_threads.html#worker-threads'>Worker Threads Docs</BadgeLink>

@ -1 +1,6 @@
# Nodejs threads
# 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.
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://alvinlal.netlify.app/blog/single-thread-vs-child-process-vs-worker-threads-vs-cluster-in-nodejs'>Single Thread vs Child Process vs Worker Threads vs Clutster in Node.js</BadgeLink>
Loading…
Cancel
Save