What is the exact meaning of non-blocking I/O operation.

109 views
Skip to first unread message

Xiao

unread,
Aug 18, 2015, 12:08:12 AM8/18/15
to nodejs
Hi All,

I am new to Node.js. What is the exact meaning of non-blocking I/O operation in Node.js. Is that only for the whole process of one client request, or it is used in the thread of Node.js. The difference here is mean, if it is for one client request, the Node.js will be blocked until the current request is finished, and then handle the next one. If it is for the Node.js thread, the Node.js will push the response callback into the event loop, and then handle the next request. I think the second one should be the correct one, because it is using V8 as the engine, but for my application, it acts the first way. Which is the correct behavior for Node.js or do I need some configuration changes for that?

Thanks.
Message has been deleted

@ismatim

unread,
Aug 28, 2015, 10:42:26 PM8/28/15
to nodejs
Hi Xiao,

Have you watch any video about Node.Js ? You have this one: https://www.youtube.com/watch?v=eqlZD21DME0  where it explained very well how nodejs works. But, there is a more fundamental video: https://www.youtube.com/watch?v=FVdH9YcB3Dg

Regards,
Isma

Anirban Bhattacharya

unread,
Sep 8, 2015, 2:26:28 PM9/8/15
to nodejs
A simple example,

You are starting reading a file a really huge file upon arrival of the request.
Any other event handler will be triggered even though file reading is not complete.

Thanks,
Reply all
Reply to author
Forward
0 new messages