2

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.

asked Jan 25, 2011 at 13:56

1 Answer 1

2

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++.

answered Jan 25, 2011 at 16:11
3
  • So two concurrent IO callbacks? They block or run concurrently? If concurrently, how is that possible w/o more than 1 thread? Commented Jan 25, 2011 at 16:53
  • node vs C++ - of course, node is the obvious choice Commented Jan 25, 2011 at 17:04
  • The callbacks run serially, in whatever order node's event loop decides. Commented Jan 25, 2011 at 17:21

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.