Table of Contents
IntroductionWill Sentance introduces the course on Servers and Node.js by explaining why Node is such a powerful piece of technology.
Node OverviewWill diagrams client-server interactions in a web application to highlight the area where Node operates.
Executing Node CodeWill discusses how Node is able to talk with the inner features of the server computer to enable network communication.
Using Node APIs
Calling a Function Under the HoodWill analyzes Node's role in running a function, including auto-running the function at the right time and inserting arguments.
Node Under the Hood Q&AWill fields questions about semicolon usage, port numbers, errors, the end function, and the timing of auto-running functions.
Request & Response with NodeAfter summarizing the functionality created by the server creation code, Will gives a real-world example of how Node is being used in relation to server requests and responses.
Express Q&AWill discusses the goals of the course and then explains what the job of Express and other middleware is within Node.
Node with HTTP
Parsing HTTPRequestObjectWill demonstrates how the HTTP message arrives in Node and is then parsed to acquire needed information from the request message.
HTTP Response in NodeWill runs through the process of filling in the auto-run function's parameters and executing it, and then using end to trigger Node to send the response.
Response HeadersWill discusses the headers for the response in HTTP format, and mentions a few additional items the response can include.
Intro to Require in NodeWill explains the value of using the built-in require method to access certain features in Node.
Cloud Node DevelopmentWill explains how cloud development allows developers to run Node on external computers. Will also explains the role of devops professionals.
Events & Error Handling
Error Handling in NodeWill explains how Node's background HTTP features determine which function to auto-run, specifically for errors instead of requests.
Event Handling in NodeWill discusses the event system in Node by going over how to edit a server after setup to respond to certain events differently or change ports.
Node Event Handling in ActionWill demonstrates how the server reacts to a client error and how Node auto-runs the function that was specified to be run.
Importing with fsWill explains location in the terminal, the benefits of using json to store data, and then diagrams the process of storing and using json data.
File System Q&AWill fields questions about the call stack, the buffer data format, imports, the auto-created error object, and parsing file contents.
Introducing Node StreamsWill introduces Node streams by presenting a use case where a group of data is broken up and worked on in parallel.
Node Streams OverviewWill creates a diagram of a Node stream and explains how streams processes large-scale data in a more efficient method.
Setting Up the StreamWill walks through the execution of code that uses readStream to set up a stream to a JSON file and set a function for Node to auto-run on each batch of data.
Processing Data in BatchesWill demonstrates how Node processes data in batches, which involves auto-running the specified function on a batch and adding calls for subsequent batches to a queue.
Checking the Callback QueueWill runs through Node's event loop process, where the callback queue is checked and a call to the auto-run function is made on each batch at the correct time.
Node Streams Q&AAfter discussing the callback queue and event loop, Will fields questions about sharing the queue, the final batch of data, buffers, queue timing, and handling incomplete data.
Asynchronicity in Node
Introduction to AsynchronicityWill emphasises the importance of knowing in what order Node is executing queued operations and why, and sets up the section to examine how Node's event loop, stacks, and queues work.
Timer QueueWill introduces the timer queue by beginning to walk through code that demonstrates how the event loop prioritizes certain queues over others.
IO QueueWill introduces the IO queue by further explaining the event loop's prioritization system, diagramming the addition of calls to the timer and IO queues.
Check QueueWill introduces the check queue and demonstrates how setImmediate adds function calls to the check queue, as well as in what order queued elements will be run.
Event Loop CompletionWill completes the event loop's processing of the various queues to demonstrate the order in which each queue is checked.
Microtask & Close QueuesWill introduces the microtask and close queues, and explains when the items within will run compared to those in other queues.
Asynchronicity in Node Q&AWill fields student questions about require, the structure of the code that makes up the event loop, and the queue data structure.