asynchronousCode, libuv, theEventLoop, streams and more
1. JavaScript is synchronous
Asynchronous: more than one process running simultaneously
Node does things asynchronously. V8 does not.
Synchronous: One process executing at a time
JavaScript is synchronous. Think of it as only one line of code executing at a time.
2. Callbacks
A function passed to some other function, which we assume will be invoked at some point.
The function 'calls back' invoking the function you give it when it is done doing its work.
Event Driven Non-Blocking I/O in V8 Javascript
3. Non-Blocking:
Doing other things without stopping your programming from running.
This is made possible by Node's doing things asynchronously.
4. libuv
Asynchronous I/O made simple.
libuv is a multi-platform support library with a focus on asynchronous I/O.
5. Streams and buffers
stream: A sequence of data made available over time. Pieces of data that eventually combine into a whole.
Last updated
Was this helpful?