A point that's often missed, including here, is that the event loop comes into picture only after all synchronous code has finished executing. The queues are populated from the beginning, yes, but they come into the picture only when synchronous code has finished executing.
U watched it till the end. It was actually a concept I looked to learn more. Please tell more about practical applications of parallelism with some code examples. 🙏
Parallelism is something which I wanna add about. True parallelism can only be achievable via multiple CPUS or multiple Cores of CPU. If you just make 4 process of nodeJS, one single core CPU won't be able to execute it parallely. Parallelism is actually about leveraging the hardware of machine Not just processes but you can also have just worker threads in same process with multiple Cores for parallelism I have talked about here : ruclips.net/video/p-i-fo0OgXA/видео.htmlsi=HpL64INhhR1qx7Bk
I really loved how you explained how concurrency works in nodejs without throwing too many jargon. It was also interesting to note that tho nodejs code might not be running parallel. But system calls are running in parallel to get things done faster
It would be really cool to see some kind of load testing comparison... E.g. how many users/requests or w/e can a node express server that runs inside a 2GB/1CPU VPS, etc. and how each of such different approaches affects that
Which is faster and easier to maintain , an app built from only Node.js or stack combination. I always think it's hard to learn node.js, since I haven't started learning. I'd like to learn through your recommended videos or sites. THANKS.
JavaScript is inherently slower than almost server side code (Go Rust Java etc..) if you are writing a enterprise level app, you will most likely use multiple backends depending on your business needs (Java, Typescript/Node, maybe Django) most Fortune 500 countries are using multiple backends and then Angular/ReactJs+Typescript for static and pseudo static typing
Node.js is the easiest to learn in general, and including if you need parallelism. It's slower than Golang and Rust, but they're harder to learn as compared to JS.
Folks, true parallelism is possible in Node.js (using the worker_threads, or cluster module or pm2 - pick what is suitable for you). For speed, use a different language.
We already have the answer, but just answering them in order. 1. Almost no change needed. Some change if using cluster module. No change needed if using pm2. 2. Node.js does it by itself. Parallelism will happen if cores are available, otherwise the tasks will compete.
Good explaination. Parallelism is something which I wanna add about. True parallelism can only be achievable via multiple CPUS or multiple Cores of CPU. If you just make 4 process of nodeJS, one single core CPU won't be able to execute it parallely. Parallelism is actually about leveraging the hardware of machine Not just processes but you can also have just worker threads with multiple Cores for parallelism.I have talked about here : ruclips.net/video/p-i-fo0OgXA/видео.htmlsi=HpL64INhhR1qx7Bk
1. Different processes - will run parallelly if CPU cores are available, otherwise they'll complete (i.e. it'll become concurrent). How to implement - cluster module or the pm2 package. 2. Different threads on same Node process - same as before. How to implement - worker_threads. Parallelism depends on CPU number cores.
I hope they fix this limation soon, there are so many easy things you could parallelise in JS. All event listeners should run in their own threads, as all settimeouts etc. All async calls can be run in their own threads. Just add automatic locking on global variables and DOM and it should just work.
Your videos become better and better from a quality perspective but become worse and worse from the point of video quality :D You should review your video setup and fix the issue, it has been much better in the past. I would also wish that your website would provide more courses than are longer and go into more detail. Currently it makes no sense to subscribe because I would finish all courses in a matter of weeks and they are to short to really go into detail.
A point that's often missed, including here, is that the event loop comes into picture only after all synchronous code has finished executing. The queues are populated from the beginning, yes, but they come into the picture only when synchronous code has finished executing.
how about when we use await does it wait make that sync code or instead of switching task it stays and answer it?
@dheeraj_kr._shrivastva2.118 could you rephrase the question better or at least use some punctuation.
U watched it till the end. It was actually a concept I looked to learn more. Please tell more about practical applications of parallelism with some code examples. 🙏
Yes.. give detailed explanation on node parallelism
your can refer to thread pool in node js I think you will get some practical example.....
yes, please give an example.
Parallelism is something which I wanna add about. True parallelism can only be achievable via multiple CPUS or multiple Cores of CPU.
If you just make 4 process of nodeJS, one single core CPU won't be able to execute it parallely. Parallelism is actually about leveraging the hardware of machine
Not just processes but you can also have just worker threads in same process with multiple Cores for parallelism
I have talked about here : ruclips.net/video/p-i-fo0OgXA/видео.htmlsi=HpL64INhhR1qx7Bk
I really loved how you explained how concurrency works in nodejs without throwing too many jargon. It was also interesting to note that tho nodejs code might not be running parallel. But system calls are running in parallel to get things done faster
I was learning Node clustering, and this video added more details to it.❤
Ajinkya Rahane Cricketing career ka pata nhi ....but his teaching career in coding seems to be bright enough
Fantastic - thank you for the talk. The whiteboard approach works really well :)
I watched the video til the end and as usual I learned a lot ! Thanks ! Any chance you can explain in a future video how BullMQ works ?
This guy is a true fullstack developer
Amazing Explanation, Thank you for making this. Please continue creating such videos, you got huge potential.
Simple easy explanation of event loop. 🙌👍
Watched till the end.
multiple instance of nodejs for parallelism , is it the reason we use process manager like PM2 on production?
I watched this till the end and also watch your upcoming videos till the end
nice video, learnt something new
It would be really cool to see some kind of load testing comparison... E.g. how many users/requests or w/e can a node express server that runs inside a 2GB/1CPU VPS, etc. and how each of such different approaches affects that
I watched this video till the end and it was very lucid, thanks!
I WATCHED THIS VIDEO TILL THE END!
I watched this video to the end, great info!
Splendid explanation 👍 I've watched the video till the end. Thank U :)
Which is faster and easier to maintain , an app built from only Node.js or stack combination. I always think it's hard to learn node.js, since I haven't started learning. I'd like to learn through your recommended videos or sites. THANKS.
JavaScript is inherently slower than almost server side code (Go Rust Java etc..) if you are writing a enterprise level app, you will most likely use multiple backends depending on your business needs (Java, Typescript/Node, maybe Django) most Fortune 500 countries are using multiple backends and then Angular/ReactJs+Typescript for static and pseudo static typing
Node.js is the easiest to learn in general, and including if you need parallelism. It's slower than Golang and Rust, but they're harder to learn as compared to JS.
Got to respect the work and consistent video upload schedule!
Nice Presentation
Folks, true parallelism is possible in Node.js (using the worker_threads, or cluster module or pm2 - pick what is suitable for you). For speed, use a different language.
Pls clarify for parallelism no change in code is needed? NodeJS does it by itself of multiple cores available?
You need to make use of cluster module (inbuilt to node). Or you can make use PM2.
@@dhanushs9159 thanks👊👍
We already have the answer, but just answering them in order.
1. Almost no change needed. Some change if using cluster module. No change needed if using pm2.
2. Node.js does it by itself. Parallelism will happen if cores are available, otherwise the tasks will compete.
Thanks allot, i watched the video till the end:)
Watched till the end 👍
I watched this video till the end as always ❤️
always watched all videos of ur till the end
awesome
I watched the video til the end.
I watched this video till the end
Thank you very much!
I watched to the end. Give me something!
I watched the video till the end
Excellent explaination
Great please give more videos about node js
Amazing explanation 👌🏻👌🏻
thnx, this was very useful
I watched this video till the end.
I watched till the end
How do you run nodejs in all 4 cores? Do you mean using worker threads?
Thank you so much
then what promise.all() can be defined?
This is similar to the scheduling concept in operating system. For example round robin scheduling
" You from another universe"😂😂 nice reference
sir , so should i move to Golang to achieve parallelism
Good explaination.
Parallelism is something which I wanna add about. True parallelism can only be achievable via multiple CPUS or multiple Cores of CPU.
If you just make 4 process of nodeJS, one single core CPU won't be able to execute it parallely. Parallelism is actually about leveraging the hardware of machine
Not just processes but you can also have just worker threads with multiple Cores for parallelism.I have talked about here : ruclips.net/video/p-i-fo0OgXA/видео.htmlsi=HpL64INhhR1qx7Bk
So how multithreading is different?
Is node microservices an example of parallelism ?
Perfect 👍
I have a small doubt suppose my one code a different process and on a different thread. Are both of them an example of paralism?
1. Different processes - will run parallelly if CPU cores are available, otherwise they'll complete (i.e. it'll become concurrent). How to implement - cluster module or the pm2 package.
2. Different threads on same Node process - same as before. How to implement - worker_threads.
Parallelism depends on CPU number cores.
where do we use this concept in real life
workers?
Great 👍
♥
how to do it in nodejs?
Still don't like this whiteboard format, man.
I hope they fix this limation soon, there are so many easy things you could parallelise in JS. All event listeners should run in their own threads, as all settimeouts etc. All async calls can be run in their own threads. Just add automatic locking on global variables and DOM and it should just work.
Your videos become better and better from a quality perspective but become worse and worse from the point of video quality :D You should review your video setup and fix the issue, it has been much better in the past.
I would also wish that your website would provide more courses than are longer and go into more detail. Currently it makes no sense to subscribe because I would finish all courses in a matter of weeks and they are to short to really go into detail.
The end of video.
I see your videos regularly but this one seemed completely irrelevant for a ~8 min video.
If only your english is good, you would be a great asset
I WATCHED THIS VIDEO TILL THE END!
I watched this video till the end
I watched the video till the end
I watched this video till the end
I watched this video till end
Me also