=== Event loop ===
Node.js registers itself with the operating system so that it is notified when a connection is made, and the operating system will issue a callback. Within the Node.js runtime, each connection is a small [[heap allocation]]. Traditionally, relatively heavyweight [[operating system|OS]] processes or threads handled each connection. Node.js uses an event loop for scalability, instead of processes or threads.<ref>[https://nodejs.org/about/ About Node.js], Node.js Website</ref> In contrast to other event-driven servers, Node.js's event loop does not need to be called explicitly. Instead callbacks are defined, and the server automatically enters the event loop at the end of the callback definition. Node.js exits the event loop when there are no further callbacks to be performed.
== Pros and cons ==
As every platform on the market, Node.js has some strengths and weaknesses. Here is a list of cons & pros about it.
;Cons
* Any CPU-intensive code will block the entire system, making the application unresponsive<ref name="Haney">{{cite web | url = http://www.haneycodes.net/ | title = To Node.js Or Not To Node.js | author = [http://www.haneycodes.net/about-me/ David Haney] | date = 2014-03-24 | publisher = [http://www.haneycodes.net/ Haney Codes .NET] | ___location = Internet | language = English | format = HTML | archiveurl = | archivedate = 2014-03-24 | deadurl = | accessdate = 2016-01-25}}</ref>
* Easy to start with, and having the possibility to do complex things<ref name="Haney" />
* Node.js does not have a better performance than matured platforms like .NET<ref name="Haney" />
;Pros
* It is very easy to program the code, if you know to use [[JavaScript]], compared to other server platforms<ref name="Haney" />
* Node.js is not designed for CPU-intensive tasks and will perform bad, if the application does execute such<ref name="Haney" />
* Node.js is not single-threaded; for a time-consuming process, like an I/O-bound operation, the single thread to which the developer has access only delegates the task to a thread in V8 that is in a pool of underlying C++ threads. Although this is a very good, scalable, highly-available way to write code, one can easily create this exact pattern in other platforms, like .NET.<ref name="Haney" />
* Node.js must parse to and from JSON, like .NET must serialize to and from JSON to interact with .NET objects, but parsing is much cheaper in Node.js concerning overhead than serializing in .NET<ref name="Haney" />
* .NET is more versatile and powerful than Node.js<ref name="Haney" />
== Tools ==
|