One of the best channels for learning advanced node-js and backend related stuff. BTW im waiting for the best practices for security in web apps. :)
@iqralatif145Ай бұрын
Thanks!
@SoftwareDeveloperDiariesАй бұрын
Thanks for the tip, my friend! 🙌
@hanibal439 ай бұрын
These are amazing videos! no one is doing deep dives in node.js love the video would like to see more practical uses of these like with small API project videos
@SoftwareDeveloperDiaries9 ай бұрын
Thanks mate! I'll keep posting more of these then 😉
@yousafraza93477 ай бұрын
Really love this methodology of deep diving a specific topic. Glad I found this channel
@alphonsoacqua7 ай бұрын
Outstanding! Finally someone is making quality videos about advanced Node.js. Thank you. 🤝
@SoftwareDeveloperDiaries7 ай бұрын
Thanks mate 😊!
@allatyurina66313 ай бұрын
I really appreciate you for your videos! You are so great at explaining such complicated things. Many thanks!
@Yohannesalemu-k8wАй бұрын
i understand know after warching 2 videos but this is clear and clear nice
@aliadel17235 ай бұрын
Best channel for nodejs
@NguyenNgoc-b3e9 ай бұрын
I love your content man
@SoftwareDeveloperDiaries9 ай бұрын
Happy to hear! 🫶
@headlights-go-up9 ай бұрын
love these types of videos! so much better than the superficial "build a twitter clone" videos that everyone else makes.
@LuisGutierrez-ct6iw8 ай бұрын
Nice video man, but I still feel curious about what is the main difference using this approach rather than NodeJS cluster mode, I mean what are the special scenarios where is useful to use either worker_threads, cluster mode with NodeJS or PM2 and child processes, is it also recommended to use all of them in the same app? Thank you in advance
@SoftwareDeveloperDiaries8 ай бұрын
Hey mate! Thanks for watching the video and for your thoughtful question! When it comes to handling concurrency in Node.js, there are indeed several options like child processes, Node.js cluster mode, and tools like PM2. Each has its own strengths and best-fit scenarios. Child processes: These are great when you need to run separate tasks concurrently, like handling CPU-intensive operations or interacting with external processes. Imagine you're building a web server with Node.js, and you need to generate PDF reports on the fly in response to user requests. However, generating PDFs is a CPU-intensive task that could block the event loop. Here, you could offload the PDF generation to a child process, allowing your main server to continue handling incoming requests without being blocked. Node.js cluster mode: This is specifically designed for scaling your Node.js application across multiple CPU cores. It's ideal for network-bound applications where you want to take advantage of parallelism to handle multiple requests simultaneously. Suppose you're developing a chat application where multiple users can connect simultaneously. Each incoming connection triggers some processing on the server, such as authentication and message handling. By using cluster mode, you can spawn multiple instances of your application across CPU cores, allowing you to handle more concurrent connections efficiently. PM2: PM2 is more of a process manager that helps in running and managing Node.js applications in production environments. It can handle clustering, monitoring, and auto-restarting of processes, making it convenient for deployment scenarios. Let's say you have a production-grade API serving hundreds of requests per minute. You want to ensure high availability and automatic restarts in case of failures. PM2 can manage your Node.js process, keeping it running smoothly by automatically restarting it if it crashes. Additionally, PM2 can monitor CPU and memory usage, allowing you to scale your application vertically or horizontally as needed. As for whether to use all of them in the same app, it really depends on your specific use case. Generally, you wouldn't use child processes and cluster mode together since they serve similar purposes. However, PM2 can complement either of them by providing additional management features. Hope this was helpful 😊
@valikonen16 күн бұрын
Don't make more sense to compare cluster with child process?
@stonebaydevil28399 ай бұрын
Excellent video!
@rahul455roy9 ай бұрын
Please also create video on middleware best practices