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
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 : ua-cam.com/video/p-i-fo0OgXA/v-deo.htmlsi=HpL64INhhR1qx7Bk
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.
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
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.
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.
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.
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 : ua-cam.com/video/p-i-fo0OgXA/v-deo.htmlsi=HpL64INhhR1qx7Bk
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.
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.
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.
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
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 : ua-cam.com/video/p-i-fo0OgXA/v-deo.htmlsi=HpL64INhhR1qx7Bk
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.
I was learning Node clustering, and this video added more details to it.❤
Amazing Explanation, Thank you for making this. Please continue creating such videos, you got huge potential.
Fantastic - thank you for the talk. The whiteboard approach works really well :)
I watched this till the end and also watch your upcoming videos till the end
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 ?
Ajinkya Rahane Cricketing career ka pata nhi ....but his teaching career in coding seems to be bright enough
This guy is a true fullstack developer
I watched this video till the end and it was very lucid, thanks!
I watched this video to the end, great info!
Simple easy explanation of event loop. 🙌👍
Watched till the end.
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
Splendid explanation 👍 I've watched the video till the end. Thank U :)
multiple instance of nodejs for parallelism , is it the reason we use process manager like PM2 on production?
I WATCHED THIS VIDEO TILL THE END!
Got to respect the work and consistent video upload schedule!
nice video, learnt something new
Thanks allot, i watched the video till the end:)
Watched till the end 👍
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.
How do you run nodejs in all 4 cores? Do you mean using worker threads?
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.
always watched all videos of ur till the end
I watched this video till the end as always ❤️
I watched the video till the end
I watched this video till the end
Nice Presentation
Great please give more videos about node js
I watched this video till the end.
I watched the video til the end.
I watched to the end. Give me something!
I watched till the end
sir , so should i move to Golang to achieve parallelism
Excellent explaination
Thank you very much!
Amazing explanation 👌🏻👌🏻
thnx, this was very useful
" You from another universe"😂😂 nice reference
Is node microservices an example of parallelism ?
then what promise.all() can be defined?
Thank you so much
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.
So how multithreading is different?
❤ thanks
where do we use this concept in real life
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 : ua-cam.com/video/p-i-fo0OgXA/v-deo.htmlsi=HpL64INhhR1qx7Bk
awesome
This is similar to the scheduling concept in operating system. For example round robin scheduling
Perfect 👍
how to do it in nodejs?
Great 👍
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.
workers?
♥
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 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.
Still don't like this whiteboard format, man.
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