After reading a lot of stuff about nodejs, I still ask my self :
What are the benefits over asp.net HttpAsync requests ?
The only limitation ( as I see) is the concurrent number of requests which IIS
limits.
I tried to paint how I currently understand it :
any help ?
.net/ado.net
can't do that nodejs can ? NET Core has an easier time working with CPU-intensive tasks and rendering static pages since the in-built IIS server kernel caching makes this process very straightforward. Therefore, . NET core vs node. js performance offers different advantages for various projects.
Besides this, when it comes to maintaining large applications, it is easier to do so with ASP.Net Core in comparison to Node. js. It also helps in creating self-sufficient, autonomous, and microservice applications.
NodeJS is an asynchronous event-driven JavaScript runtime environment designed to build scalable network applications. Asynchronous here refers to all those functions in JavaScript that are processed in the background without blocking any other request.
While ASP.NET uses C# as its primary language, Node. js is based on JavaScript. There's no denying that by offering a strict type system and compile-time error checks, C# is more potent than JavaScript, which relies on Facebook's Flow static type checker or Microsoft TypeScript.
IIS limits the number of concurrent requests to a high number by default. The limit can be raised arbitrarily though.
There are two main benefits attributed to node.js:
ASP.NET does not support number 2 so that is an advantage.
Async IO and non-blocking code is fully supported by ASP.NET. Plus, you get the performance advantage of a JITed statically typed language. For that reason ASP.NET generally has superior performance to node.js for non-toy applications (printing "hello world" is not a real benchmark workload! neither is sleeping for 10 seconds).
node.js benefits from the extremely slim code-path it has. For that reason very minimal applications like "echo" or "hello world" are probably faster. This does not hold for apps which actually perform work.
So if you want to know which is "better" you need to consider a particular scenario. Benchmark with a realistic workload (no, calculating a factorial number is not realistic. C# is just going to win by a large amount. Means nothing). Also factor in maturity of the platform, libraries, documentation, support, developer productivity, ....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With