nodejs / education

A place to discover and contribute to education initiatives in Node.js
Other
417 stars 58 forks source link

What are the best resources to understand how the internals of Node.js work? #24

Closed daviddias closed 1 year ago

daviddias commented 7 years ago

I've been asking myself "what is the best way to learn the Node.js internals today?" and in all my searches,with the exception of the libuv book, I've been only able to find resources on how to use Node.js.

What is the best way to understand how the code is organized and the internals design from a technical standpoint? I've been using Node.js for so long now and I realized.

addaleax commented 7 years ago

I think one reason for this lack of resources might be that for the most part, Node.js is just a ton of glue code that holds libuv, V8, openssl, zlib, etc. together and makes their functionality available to JS land, so there isn’t actually terribly much going on inside of Node itself.

What is the best way to understand how the code is organized and the internals design from a technical standpoint?

Not sure, but if you have individual questions that are specific enough, you can ask them at https://github.com/nodejs/help, or maybe #node-dev on Freenode (depends on the question, I guess)…

hackygolucky commented 7 years ago

@diasdavid Thank you for asking this question here! I'd love to start an FAQ that logs these sorts of Q/A after we find some good responses. Sort of like StackOverflow but actually exists within our CoC and our awesome contributors' view.

@addaleax If I started an FAQ in Education with these kinds of questions and listed your answer, do you think that would be a good start? There are a lot of folks who don't know that even -this- is an option, but I don't want to inundate those mediums if it would be too many people going there at once.

addaleax commented 7 years ago

@hackygolucky Just to be sure we’re talking about the same thing: Are you thinking about a FAQ on Node.js internals, or a FAQ with questions that specifically ask for resources (likes this one); or something completely different? :D

hackygolucky commented 7 years ago

ah @addaleax I was thinking of the latter: questions that ask for resources :)

daviddias commented 7 years ago

Node.js is just a ton of glue code that holds libuv, V8, openssl, zlib, etc.

:) I believe that there is still space for a resource that explains how things get glued together and why, as in: what this piece offers to the puzzle and why A instead of B.

Sort of like StackOverflow but actually exists within our CoC and our awesome contributors' view.

Yes please :) Just being able to search would be stellar and save a lot of duplicates/time spent.

bnoordhuis commented 7 years ago

I've been involved in similar documentation efforts before but the results are usually not very good and tends to go stale over time as the code base it describes evolves.

It's a perennial problem for code-centric projects: the people that need documentation can't write it, while the people that can don't need it (and therefore aren't very motivated to write it.)

An approach I had some success with at StrongLoop was writing up a weekly changelog of development in and around core, with the occasional Cliff's note on how and why a particular change was implemented.

It got us a good amount of page views and it's been the (or at least a) starting point for some contributors. The downside is that a good write-up takes appreciable time, it's no five minute job.

kevin2r commented 7 years ago

@bnoordhuis Something like http://v8project.blogspot.com would be ideal.

adrianofsp commented 7 years ago

Definitely we can't forget node-gyp and v8.

vardanator commented 6 years ago

As many others already answered, the best way is to read the source code, I've just started to dig and dive deeper into V8 and this might help you: https://medium.com/@vardanator/node-js-v8-internals-an-illustrative-primer-83766e983bf6

helio-frota commented 6 years ago

I think is good to add two more:

https://github.com/danbev/learning-libuv

https://github.com/danbev/learning-nodejs

ilivestrong commented 5 years ago

I think for me, this book was alot beneficial to move forward: https://github.com/libuv/libuv