Table of Contents
Networking, Servers, and Clients
Networking and Packets
James Halliday introduces Bash by placing its context with the history and background of Unix, an operating system first developed at AT&T Bell Labs in the 1960s.Protocols and Ports
James introduces the concept of protocols, which are languages that allow computer programs to speak to each other. Examples of protocols include HTTP, SMTP, IMP, and SSH.Servers and Clients
James talks about a server, which is a computer listening to incoming connections, even if they are coming from local connections. Clients are computers that are initiating connections with a server on the other end.Netcat
Netcat (often abbreviated to nc) is a computer networking utility for reading from and writing to network connections using TCP or UDP.HTTP and Headers
By showing a simple page request to Google from the command line, James introduces the Hypertext Transfer Protocol (HTTP), which is how web servers and browsers communicate with each other.HTTP Post
James demonstrates how HTTP Post is used to send information through forms.Curl
James shows how to use the curl command, a tool to transfer data from or to a server with the results from a curl request of presented within the terminal. James takes questions from students.Curl Headers
James demonstrates how to set HTTP headers within a curl request.SMTP
By sending an email through localhost, James introduces SMTP, the protocol used to deliver email messages.IRC
James introduces Internet Relay Chat (IRC), a text-based chat protocol that is still very popular among programmers.Q&A: IRC Nicknames
James takes questions from a student about setting a nickname in an IRC.Binary Protocols and Inspecting Protocols
After mentioning that the previous protocols have been text-based, James reviews binary protocols like SSH. Then James shows how to inspect protocols to review data traveling coming out and into your machine.
Streams
Introducing Streams
James introduces streams as a method to move data around networks or even on the same computer.Transform Data
To transform a data with a stream, James shows how to convert text case within a file and display the result in standard output. James takes questions from students.Introducing through2
After installing through2 that allows the creation of streams quickly.Q&A: Streams
James takes questions from student about streamingUsing through2
James reviews the differences between through2 and native npm for using streams.Introducing concat-stream
James introduces concat-stream, which is used to collect all the data from a stream into a single buffer.Q&A: Buffering Streams
James takes questions from students about starting and closing streams. James also demonstrates how to display a message that a buffer is too big instead of closing out the program without warning.
Stream Types
Stream Types
James reviews the different types of streams: readable, writable, transform, and duplex.Writable Streams
After examining the methods for creating writable streams, James demonstrates how to build one.Readable Stream
James looks at readable stream methods, which are used when supplying data. Readable streams can also be paused and resumed.Transform and Duplex Stream
James reviews the transform stream, which is a particular kind of duplex stream used to operate on a stream in transit. Then James looks at duplex streams, which can accept and deliver content at the same time.Duplex Streams
After taking questions from students about different types streams, James provides an example of a duplex stream. Then James takes questions from students.Simple VPN
Based on a question from a student, James builds a simple VPN using cryptographic core streams methods.Object Streams
James introduces object streams with objectMode, which allows use of any kind of object except null into a stream.
Core Streams
Core Streams
James reviews the core streams that are available in node.HTTP Core Streams
After reviewing HTTP Core Streams, James builds an server and client and have them talk to each other.Crypto Streams
James discusses other cryptographic core methods and demonstrates how to incorporate a hash into a stream that can be used to securely identify unique information.Zlib Core Streams
To use Gzip and Deflate/Inflate, James reviews the Zlib core methods.split2
James introduces split2, which breaks up a stream and reassemble that stream so that each line is a chunk.
Web Socket
Websocket Streams
James illustrates how to put streams in the browser with HTML5 websockets using node Streams API.Websocket Node Client
After setting up the websockets to work in the browser, James shows how to streams in node with a node websocket client.
Stream Modules
collect-stream, from2, and to2
James reviews modules found to be useful in development: collect-stream for putting streams into an array and performing unit tests; from2 for ready stream with a pull function; and to2 for a writable stream with a write and flush function;duplexify
James introduces a duplexify, which creates a writeable and readable stream into a single streams2 duplex stream.pump, pumpify, and end-of-stream
James discusses error propagation and how it leads to server crashes. To contribute to creating stronger streams, James uses the pump module that helps clean up streams to handle errors gracefully. The pumpify module does similar error handling as pump, but also provides a readable and writeable stream. James introduces end-of-stream, which is a node module that calls a callback when a readable/writable/duplex stream has completed or failed.
Remote Procedure Call and Multiplex
rpc-stream
James introduces Remote Procedure Call (RPC), which is a protocol that one program can use to request a service from a program located on another computer on a network without having to understand the network's details. Then James shows how to set up a simple RPC system.Multiplex
Due to limitations of the number of streams a browser can have at one time, James reviews how to use multiplex to send many streams over a single stream.
Wrapping Up
Q&A: WebRTC
James takes questions from the audience about using WebRTC with webrtc-swarm.Q&A: Tag Template Literal
James takes questions from the audience about tag template literal, the HTML parser, and application frameworks.Q&A: WebAssembly
James talks about the future of JavaScript and WebAssembly.