How does nodejs execute code (event loop)?

547 views
Skip to first unread message

Bodo Kaiser

unread,
Feb 9, 2013, 4:22:34 AM2/9/13
to nod...@googlegroups.com
Hello,

this question is coming up in me for a while since I have learned more and more about the features nodejs can provide.

1. I would like to know how a nodejs lifecycle looks like that mean from the kernel which is sharing events through kqueue, epoll and so on.
2. I also would like to know how I can imagine concurrency and how they get the async calls to be not blocking.

Would be great if someone could answer me the questions or share some links.

Regards,
Bodo

Angel Java Lopez

unread,
Feb 9, 2013, 4:33:52 AM2/9/13
to nod...@googlegroups.com
Hi people!

Bodo, one link I read:


But now, node.js is based on libuv, instead of libev:


Excellent resource:


Background

The node.js project began in 2009 as a JavaScript environment decoupled from the browser. Using Google’s V8 and Marc Lehmann’s libev, node.js combined a model of I/O – evented – with a language that was well suited to the style of programming; due to the way it had been shaped by browsers. As node.js grew in popularity, it was important to make it work on Windows, but libev ran only on Unix. The Windows equivalent of kernel event notification mechanisms like kqueue or (e)poll is IOCP. libuv is an abstraction around libev or IOCP depending on the platform, providing users an API based on libev. As of the node-v0.9.0 version of libuv, libev has been removed and libuv directly interfaces with Unix.


Another resource

Angel "Java" Lopez
@ajlopez
gh:ajlopez

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Bodo Kaiser

unread,
Feb 9, 2013, 5:28:33 AM2/9/13
to nod...@googlegroups.com
Hey,

I found this section answering my question: http://nikhilm.github.com/uvbook/basics.html


Thank you for sharing the links, I wish you a nice weekend.

Regards,
Bodo
Reply all
Reply to author
Forward
0 new messages