Transcript from the "Node.js for APIs" Lesson
[00:00:23] Because it is a bit driven when requests do come in, they get sent off to the bit loop to be handled asynchronously, so that way you can register more requests so it is very high concurrent. But because it is single threaded, It's not gonna be great for CPU intensive things.
[00:00:41] So you're not gonna be doing things like machine learning and that type of stuff, you could and you can optimize like I put here, you can definitely optimize it for it not be single threaded. But, you're probably better off using something like Python or something like that to do some big CPU intensive operations.
[00:01:01] When you do keep, like I said when you keep node async, it can handle a lot of concurrent requests. And the key here is that you do keep it async. You could block node. For instance if you put a while loop that takes forever to execute, nobody's gonna be able to register anymore requests on your api.
[00:01:53] But it is definitely not designed for that. And there might be better tools. Really depends on what you want to do. I mean, nowadays you can do machine learning in a browser. I think they have TensorFlow in a browser now, so. Who am I to say you can't do it, but I'm just letting you know what it was built for.
[00:02:07] What it's intended for. Yeah, and there's just a lot of open source stuff out there. Literally, there is so many open source tools for APIs and node, it's kinda ridiculous. We're just gonna be talking about one, Express. But there's so many of them. Most of them are actually based off Express, but there is a lot of them, and that's just true.
[00:02:26] With anything in node, there's just a lot of packages and a lot of libraries, but when it comes to APIs, there is this overflow amount.