Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm wondering how the "evented-io" in node.js any different from the windows async IO model?

Is the callback from node.js executed on a thread, if not, where is it run?

I don't mean to question the productivity or awesomeness of node, but specifically to understand if the architectural design differs from what is commonly done in the windows space, say with WCF or ASP.Net.

share|improve this question
add comment

1 Answer

Node.js runs a single thread. the thread runs the event loop, and when the async I/O has data available, the corresponding callback runs.

I can't speak to Windows async i/o model.

According to its website, "Node's goal is to provide an easy way to build scalable network programs.". I'd venture to guess that you could achieve that goal quicker with Node than if you were writing a native Windows service in C++.

share|improve this answer
    
So two concurrent IO callbacks? They block or run concurrently? If concurrently, how is that possible w/o more than 1 thread? –  Scott Weinstein Jan 25 '11 at 16:53
    
node vs C++ - of course, node is the obvious choice –  Scott Weinstein Jan 25 '11 at 17:04
    
The callbacks run serially, in whatever order node's event loop decides. –  Adam Crossland Jan 25 '11 at 17:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.