Single threaded event loop architecture
# NodeJS
- What is the difference between javascript and NodeJS?
Javascript script or ECMA Script is a programming language standard
NodeJS is a runtime interpreter and environment written in
C++
which support ECMA ScriptJS Engine
Both google chrome and node js both uses v8 javascript engine. Nodejs runtime is written in
C++
- Blocking and Non blocking calls
- How is non-blocking achieved? Implemented
- Event Loops
- Callback Pattern
- Foundations of nodejs
- WebAssembly System Interface (WASI)
A function is passed as an argument. aka call-after. Could be synchronous or asynchronous
function processData (callback) {
fetchData(function (err, data) {
if (err) {
console.log("An error has occurred. Abort everything!");
return callback(err);
}
data += 1;
callback(data);
});
}
What is IO
"I/O" refers primarily to interaction with the system's disk and network supported by libuv.
- libuv
- libuv is a multi-platform support library with a focus on asynchronous I/O.
- What is v8 javascript engine?
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.
- What the difference between nodejs and v8 engine?
v8 - only client side in browser
nodejs allows you to run ECMAScript event at server-side, provices a runtime ecosystem for js independent of browser.
- Ffeatures like package manager and debugger availble in node ecosystem
- Python and nodejs share some similarities
Both are implemented in low level languages like
C
andC++
- both provides runtimes and package managers, use RFCs for language development
- Uses C API
- NodeJs project uses lots of python tooling as well
- ix failing tests
- Improve code coverage
- Project contribution, todo
- HTTP/2
- compressed headers
- Server Push
- Python vs nodejs JIT compiler performance difference
- Benchmarking Games