Advanced Node.js

This course will teach you the core Node.js concepts and API modules from simple utility modules all the way to streams and clusters.
Course info
Rating
(243)
Level
Advanced
Updated
Feb 16, 2017
Duration
3h 45m
Table of contents
Course Overview
Node != JavaScript
Concurrency Model and Event Loop
Node's Event-driven Architecture
Node for Networking
Node for Web
Node's Common Built-in Libraries
Working with Streams
Clusters and Child Processes
Course Wrap Up
Description
Course info
Rating
(243)
Level
Advanced
Updated
Feb 16, 2017
Duration
3h 45m
Description

Hello, and welcome to Advanced Node.js, part of the Node.js Learning Path here at Pluralsight. My name is Samer Buna, and I’m looking forward to helping you understand how the Node runtime work and learn about all the powerful built-in features that you can use in every Node process. Along the way, you’re going to be learning about things like modules management, V8, concurrency and event loop, streams, child processes, and clusters. You’ll also be using npm and Node's event-driven modules for networking and HTTP web servers. You’ll want to make sure you’re already up to speed on modern JavaScript and the basics of Node.js. So if you’re ready to get started, Advanced Node.js is waiting for you. Thanks again for visiting me here at Pluralsight!

About the author
About the author

Samer Buna is a polyglot coder with years of practical experience in designing, implementing, and testing software, including web and mobile applications development, API design, functional programming, optimization, system administration, databases, and scalability. Samer worked in several industries including real estate, government, education, and publications

More from the author
Node.js: Getting Started
Beginner
3h 29m
11 Sep 2018
Advanced React.js
Advanced
3h 54m
21 Jul 2017
Building Scalable APIs with GraphQL
Intermediate
2h 10m
19 Aug 2016
More courses by Samer Buna
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hello everyone, my name is Samer Buna, I am a software engineer at jsComplete. com and I am excited to present to you this advanced course about Node. js. This course is completely about the Node. js runtime itself and absolutely not about the popular NPM packages that are usually presented in courses about Node. This course hopes to teach you the core Node. js concepts and API modules from simple utility modules all the way to streams and clusters. Some of the major topics that we will cover include: Node's Architecture and dependencies The require module and its 5 major steps The event-loop and its concurrency model Event emitters, callbacks, and promises. Working with TCP, UDP, HTTP and HTTPS Node Common Built-in Libraries like os, fs, console, and util Node's built-in debugging options Readable, Writable, and Transform streams Using the child process module and load balancing with the cluster module. By the end of this course, you should be comfortable understanding advanced code written in Node, and writing efficient and scalable node modules and packages. You'll be able to answer most of the questions an experienced Node developer is expected to answer. Before beginning this course, you should be comfortable with JavaScript itself to get a better value out of this course. This includes the modern JavaScript features of EcmaScript 2015 and beyond. I hope you'll join me on this journey to learn Node. js beyond the basics with the Advanced Node. js course at Pluralsight.

Concurrency Model and Event Loop
One of the most important concepts to understand about Node. js is its concurrency model for handling multiple connections and the use of callbacks. You might know this as the non-blocking nature of Node. js. In Node, this model is based on an event model, just like Ruby's Event Machine, or Python's Twisted. In Node, this event model is organized through what's known as the event loop. Slow I/O operations are handled with events and callbacks so that they don't block the main single-threaded execution runtime. Everything in Node depends on this concept so it's extremely important that you fully understand it.

Node's Common Built-in Libraries
Let's explore some of the common built-in modules that come with Node. Node provides a number of utilities to access information directly from the operating system. We can use the os module for that. We can read information about CPUs, like their model, speed, and times. We can read information about network interfaces. We can read their IP addresses. We can also read the mac addresses, netmasks, and families. We can read information about total and free memory, where is the OS temp directory, and most importantly, what Operating System was Node compiled for. The type method will return Linux or Windows_NT, or Darwin for OS X. We can use that method, for example, to write code specific to an Operating System. We can also read the release version of the Operating System with the release method. The userInfo method is a handy one. It returns an object with information about the current user: username, uid, gid, shell, and home directory. On Windows, the shell attribute is null and both uid and gid are -1. Os. constants return an object with all the operating system error codes and process signals. The signals list is a handy, quick way to see a reference of all process signals available in the underlying OS.