Linked Questions

303 votes
3 answers
153k views

In PHP (or Java/ASP.NET/Ruby) based webservers every client request is instantiated on a new thread. But in Node.js all the clients run on the same thread (they can even share the same variables!) I ...
Shai UI's user avatar
  • 52.2k
65 votes
4 answers
18k views

Node.js solves "One Thread per Connection Problem" by putting the event-based model at its core, using an event loop instead of threads. All the expensive I/O operations are always executed ...
Filipe Santos's user avatar
61 votes
1 answer
10k views

In their arXiv paper, the original authors of Julia mention the following: 2.14 Parallelism. Parallel execution is provided by a message-based multi-processing system implemented in Julia in the ...
Amelio Vazquez-Reina's user avatar
80 votes
1 answer
78k views

Possible Duplicate: Why and When to use node js? Can someone tell me why all this fuss about node.js ? Is a regular web site (lets say a blog) written in node.js faster compared to same written in ...
overthetop's user avatar
  • 1,664
12 votes
2 answers
17k views

I am thinking of using NodeJS for my website instead of my current PHP + Apache setup. Are there any major disadvatanges/advantages to making this switch? My site will get lots of small requests and ...
Kory Hodgson's user avatar
5 votes
6 answers
2k views

As an example var runInfinite = function(){ while(1) { // Do stuff; } }; setTimeout(runInfinite, 0); Is it possible to break this runInfinite function form running infinite? I ...
Somnath's user avatar
  • 3,285
2 votes
4 answers
4k views

I read that the javascript language has characteristics that assist in the implementation of non-blocking IO which contributes to the success of projects like node.js. My question is what are these ...
rogermushroom's user avatar
0 votes
1 answer
3k views

For example: var i = 0; while(true) http.request('a url', callback_f); function **callback_f**(){ **i++**; } In my simple imaginary example, some request might try to increase i's value in the ...
Ali Bahraminezhad's user avatar
1 vote
2 answers
1k views

This question is regarding the sinlge threaded model of JavaScript. I understand that javascript is non-block in nature cause of its ability to add a callbacks to the async event queue. But if the ...
Lakmal Caldera's user avatar
0 votes
5 answers
383 views

How and when is the single threaded asynchronous processing model of nodejs a better approach than the multithreaded approach of the known server Gurus like PHP, Java and C#?. Can someone please ...
henrybbosa's user avatar
  • 1,125
0 votes
2 answers
460 views

Which process handles async or simultaneous work to happen in node js. Is there any specific api that takes care of all these events to happen in queue?
StangSpree's user avatar