Linked Questions
11 questions linked to/from Grasping the Node JS alternative to multithreading
303 votes
3 answers
153k views
Why is Node.js single threaded? [closed]
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 ...
65 votes
4 answers
18k views
Is NodeJS really Single-Threaded?
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 ...
61 votes
1 answer
10k views
Parallelism in Julia: Native Threading Support
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 ...
80 votes
1 answer
78k views
What are the advantages of using Node.js vs PHP [duplicate]
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 ...
12 votes
2 answers
17k views
Disadvantages of using NodeJS instead of PHP
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 ...
5 votes
6 answers
2k views
Killing a JavaScript function which runs infinite
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 ...
2 votes
4 answers
4k views
How does non blocking IO work in javascript
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 ...
0 votes
1 answer
3k views
How to control concurrency access on a variable in NodeJS?
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 ...
1 vote
2 answers
1k views
How does JavaScript's Single Threaded Model handle time consuming tasks?
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 ...
0 votes
5 answers
383 views
How does node js do it better?
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 ...
0 votes
2 answers
460 views
Asynchronous process handler in node
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?