Build A Websocket Server With Node.Js - No Libraries - 2024 - Printable Version +- Softwarez.Info - Software's World! (https://softwarez.info) +-- Forum: Library Zone (https://softwarez.info/Forum-Library-Zone) +--- Forum: Video Tutorials (https://softwarez.info/Forum-Video-Tutorials) +--- Thread: Build A Websocket Server With Node.Js - No Libraries - 2024 (/Thread-Build-A-Websocket-Server-With-Node-Js-No-Libraries-2024--541103) |
Build A Websocket Server With Node.Js - No Libraries - 2024 - AD-TEAM - 09-09-2024 Build A Websocket Server With Node.Js - No Libraries - 2024 Published 9/2024 MP4 | Video: h264, 1920x1080 | Audio: AAC, 44.1 KHz Language: English | Size: 5.93 GB | Duration: 9h 15m Advanced WebSocket server course for everyone! Build a WebSocket server from scratch using JavaScript. No libraries.
[b]What you'll learn[/b] Build a custom server that can receive large, fragments of WebSocket data Master the concepts of fragmentation, streaming and chunks Learn Bitwise parsing (shift operators, AND, OR and XOR) Understand and work with Buffers Gain a deep understanding of pure WebSockets (no libraries) Binary processing of WebSocket data Use the debugger to test and fix server code Understand SHA hashing and the crypto module [b]Requirements[/b] Basic knowledge of WebSockets required. Check out my WebSockets Protocol - Very Informative course Basic knowledge of JavaScript and HTML will be helpful Desire to understand the INNER-WORKINGS of the pure WebSocket protocol (no libraries) Desire to become a WebSocket ninja A computer is required as you need to code alongside me to learn effectively [b]Description[/b] TAKE YOUR WEBSOCKET SKILLS TO THE NEXT LEVEL!In this course, we will build a complete WebSocket server, using Node.js and JavaScript, from scratch.Many unique features.No libraries.No modules.We use ONLY pure Node.js and pure JavaScript to benefit YOU most.Don't get hung up with large data. Step by step I'll show you how to create a WebSocket application that receives large data from a client, and sends it back over a WebSocket connection. IMPORTANT: A huge advantage in my course is that you learn , how to send huge payloads . So you learn how to to manage chunking, streaming, and fragmentation properly. You may not get this information elsewhere.Key Focus AreasPure Node.js and JavaScript: Empower yourself. Master the art of building a WebSocket server from scratch, leveraging only the core capabilities of Node.js and JavaScript.Handling Large Payloads: Unlike other resources that focus on small to medium-sized payloads, this course will teach you how to manage chunking and fragmentation for large data transfers. This is a critical skill, as handling large payloads is a significant challenge that many developers shy away from.Real-World Application: Develop an application that can efficiently handle large data payloads, ensuring your WebSocket server is robust, scalable, and reliable.Such comprehensive and advanced course may not be available elsewhere. My course is dedicated to writing pure native server code that focuses on WebSockets. This course is particularly special because I show you how to handle sending and receiving large data payloads with WebSockets. . Most other courses or information on the web only focuses on small to medium sized payloads. That's relatively easy to do. So, as has become my trademark or characteristic of my courses, I tackle the hard practical stuff to elevate your learning to the next level so that you benefit most.YOU NEED TO CATER FOR LARGE PAYLOADS WITH WEBSOCKETSOften a user needs to send several megabytes to gigabytes. So the available information and courses which limit the WebSocket data payloads to 65,535 bytes is inadequateThis is not good enough for you!Many modern applications, such as real-time analytics, file sharing, live updates, and multimedia streaming, involve transferring large amounts of data. If your WebSocket server cannot handle these large payloads, it may lead to performance issues, data loss, or even crashes.THE CHALLENGES IN BUILDING A WEBSOCKET SERVER FOR LARGE PAYLOADSWhile the WebSocket protocol itself is designed to handle continuous, bi-directional communication, building a server that efficiently handles large payloads can be challenging for several reasonsrotocol Complexity: The WebSocket protocol involves several layers of complexity, including message framing chunking and fragmentation. Understanding these nuances is essential for building a robust server.Buffering and Streaming: Large payloads often require efficient buffering and streaming mechanisms to prevent memory overflow and ensure smooth data transfer. Implementing these mechanisms correctly can be tricky.Error Handling: Large payloads increase the likelihood of errors during transmission. A well-designed server must include error handling mechanisms to manage and recover from such errors gracefully.My course is here to empower you, unashamedly.Why Knowing How to Build a fully-functional WebSocket server is a Game Changer for Web App Developers#1 Deep Understanding and Customization. Building a Node.js WebSocket server from scratch without using libraries is crucial for web developers because it provides a deep understanding of the underlying protocol and its mechanics. By implementing WebSockets purely in JavaScript, developers gain hands-on experience with the intricacies of real-time communication, including framing, chunking, working with readable streams, fragmentation, and error handling. This knowledge allows for better customization and optimization of the server to meet specific application needs, ensuring performance and scalability.#2. Mastering Core Concepts and Flexibility. Learning to build a WebSocket server from scratch also enhances problem-solving skills and flexibility. Without the abstraction of libraries, developers must handle every detail, from establishing connections to managing state and handling errors. This approach fosters a comprehensive understanding of the technology, enabling developers to troubleshoot and optimize their applications more effectively. Additionally, it allows for the creation of tailored solutions that can be adapted to various use cases, making the developer more versatile and proficient in handling complex real-time applications.THIS COURSE FOCUSES ON THE PURE WEBSOCKET PROTOCOL, INFORMATIVE, WITHOUT LIBRARIES.WHAT SKILLS ARE NEEDED?You need to have a basic idea of what WebSockets are. If you have never come across the term before, then I encourage you to take my WebSockets Protocol - Very Informative course. In that course, I take you through the WebSocket protocol from the basics through to the advanced.A basic knowledge of HTTP, HTML and JavaScript will also be helpful.WHAT YOU'LL LEARN IN THIS COURSEThis comprehensive course has unique content and will guide you through the entire process of building a Node.js WebSocket server from scratch, without relying on any libraries. You'll gain a deep understanding of the WebSocket protocol and master its implementation on the server side.You'll learn and master the WebSocket protocol, without relying on libraries.1. Creating the Initial HTTP Server:Start by setting up an HTTP server, which will serve as the foundation for your WebSocket connection.2. Implementing the Handshake Process:Learn how to calculate the Sec-WebSocket-Accept value on the server and send back the required headers to upgrade the HTTP connection to a WebSocket connection.3. Receiving WebSocket Data:Understand how to listen for data events on the WebSocket connection.Extract important information from WebSocket frames, including the FIN bit, opcode, and payload length fields.Learn how to extract the Masking Key from the client and use it to decrypt the received data.4. Sending WebSocket Data:Unpack the structure of WebSocket data frames.Construct and send binary frames to the client over the wire.5. Handling Closure Frames and the Closing Handshake:Learn how to process different types of WebSocket frames, including closure frames.Understand how to extract closure codes and reasons on both the client and server.Discover how to send a close frame to the client and gracefully close the underlying WebSocket connection in compliance with the RFC.ADVANCED CONCEPTS COVEREDBuffers and Bitwise Parsing: Master the use of buffers and bitwise operations to parse and construct WebSocket frames. These concepts are also used in most other programming languages like PHP, Python, C, C++, Java, etc, setting you up for success.Chunking and Fragmentation: Learn how to handle large payloads by chunking and fragmenting data in compliance with the WebSocket protocol.Reading and Writing to Buffers: Understand how to efficiently read from and write to buffers.SHA Hashing: Learn how to perform SHA-1 hashing for the WebSocket handshake.Examining Data Packets: Gain insights into examining and processing data packets using bitwise operators.Encrypting and Decrypting Data: Understand how to encrypt and decrypt data using the Masking Key and the modulus operator.AND TONS MORE!Why This Course Stands OutThe focus is on YOU. I try to benefit you most with practical skill. We learn together in a fun way. This course is uniquely dedicated to writing pure native server code for WebSockets, a topic often overlooked in favour of simpler, library-based solutions.By focusing on the complexities of large data payloads, you'll gain a deep understanding of the WebSocket protocol and the skills to tackle even the most demanding real-time applicationsMeet Your Instructor: ClydeClyde is a coding enthusiast who has been immersed in the world of computers since the age of 7.With years of experience in web development and a passion for teaching, Clyde brings a wealth of knowledge and practical insights to the course. His engaging teaching style and real-world examples will make complex concepts accessible and enjoyable.Enrol nowDon't miss this opportunity to elevate your web development skills by building a WebSocket server from scratch.Web development is a blazing hot topic at the moment. But you have a distinct advantage. This course offers memorable learning topics, actionable tactics and real-world examples.Get ready to transform your projects into interactive experiences that captivate users and make you money!Let's get crackin' Overview Section 1: Introduction Lecture 1 Introduction Lecture 2 To build a WebSocket server, we need to be RFC compliant Lecture 3 Course Structure Lecture 4 Take matters into your own hands. Section 2: Creating a NodeJS server Lecture 5 WebSocket Server Goal: Create a HTTP web-server Lecture 6 Project Files: starting HTML and CSS Lecture 7 Overview of HTML and CSS Lecture 8 Setting up our HTTP server Lecture 9 Creating custom modules and finishing off the HTTP server Lecture 10 Implementing basic error handling Lecture 11 Using "Run and Debug" to examine the forEach loop Lecture 12 Testing our error handling code Lecture 13 Project Files: HTTP server Section 3: Establishing a WebSocket Connection Lecture 14 WebSocket Server Goal: Establish a WebSocket Connection Lecture 15 Using the 'upgrade' event listener to receive 3 important object Lecture 16 Examining the request object in the terminal Lecture 17 Reading the client's opening handshake request headers Lecture 18 Sending a "400 Bad Request" response if the client handshake headers fail Lecture 19 Generate the server response headers object Lecture 20 Extracting the Sec-WebSocket-Key and using the crypto module Lecture 21 Timeout! What is SHA-hashing and the crypto module? Lecture 22 Generate the Sec-WebSocket-Accept value and send back headers to the client Lecture 23 Testing our code and opening up a valid WebSocket connection Lecture 24 Summary Lecture 25 Project Files: Establishing a WebSocket connection Section 4: Receiving WebSocket Data Lecture 26 WebSocket Server Goal: Extract Payload Data Lecture 27 Setting up our file for the next goal Lecture 28 The socket object inherits from the stream.Duplex class Lecture 29 The socket object is a duplex stream, allowing us to listen for chunks Lecture 30 Defining our data event handler Lecture 31 Quick cut - adding the 'end' event listener to our socket object Lecture 32 Define the processBuffer() function Lecture 33 The WebSocket binary frame structure Lecture 34 Coding the task management looping function Lecture 35 Extract the first 2 bytes of data from the WebSocket data frame Lecture 36 What are Buffers? Lecture 37 Buffers are mandatory Lecture 38 Why is the letter "a" sent as 7 bytes? Lecture 39 Using the Debugger tool to analyze code Lecture 40 Extracting the FIN bit Lecture 41 Bitwise operators Lecture 42 Extracting the MASK, OPCODE and initial LENGTH information Lecture 43 Next steps Lecture 44 Setting up code to extract the payload length details Lecture 45 The 3 categories of payload lengths Lecture 46 Payload length recap Lecture 47 Calculating the payload length Lecture 48 Summary Lecture 49 Breakdown of the getLength() method Lecture 50 The readUInt16BE() method Lecture 51 Payload length checks Lecture 52 Next Steps Lecture 53 Extract the Masking Key Lecture 54 Next steps Lecture 55 Define the getPayload() method Lecture 56 Checking for whether we need additional chunks of data Lecture 57 Extract one full frame of data (masked) Lecture 58 Why did I not use the _consumeHeader() method? Lecture 59 Unmasking the frame payload Lecture 60 What is the modulus operand Lecture 61 Create a persistent fragments array and check for more frames (FIN bit check) Lecture 62 Why have a fragments array? Lecture 63 SMALL payloads - Using the debugger to analyze logic Lecture 64 Fixing the error in our consumePayload() method Lecture 65 Adding a prepopulate button to the HTML Lecture 66 MEDIUM Payloads - Using the debugger to analyze logic Lecture 67 Why did I use readUInt16BE() Lecture 68 LARGE Payloads: Part 1 of 3. Understanding getLength() logic Lecture 69 What is BigInt? Lecture 70 Chunks, Frames and Messages Lecture 71 LARGE Payloads: Part 2 of 3. Waiting for additional chunks Lecture 72 LARGE Payloads: Part 3 of 3. Processing the entire payload into _fragments Lecture 73 Improvements comments and adding opcode checks Lecture 74 Advanced - chunk size variation between debugger vs live environment Lecture 75 Improving our _getInfo() method Lecture 76 Project Files: Extract Payload Data Section 5: Sending WebSocket Data Lecture 77 WebSocket Server Goal: Send A WebSocket Message Lecture 78 Getting project files ready to send data to the client Lecture 79 Creating a blueprint of the sending frame Lecture 80 Calculating the size of the variable-length header field Lecture 81 Variable-Sized Frame Headers in WebSockets Lecture 82 Create the binary frame buffer blueprint Lecture 83 Creating the first byte of the frame Lecture 84 Why did I choose to set opcode to BINARY Lecture 85 Bitwise shift operators Lecture 86 Populate the frame header with data Lecture 87 Sending the frame to the client Lecture 88 Testing whether the client received the frame Lecture 89 Blobs - did you know? Lecture 90 Sending data to the client via the write() method Lecture 91 Creating a reset() function Lecture 92 Using debugger tool to examine code Lecture 93 How does the WebSocket API handle fragmentation Lecture 94 Displaying the WebSocket message on the client-side Lecture 95 Why did I use the FileReader interface? Lecture 96 Project Files: Sending Data Section 6: Responding to a closure frame Lecture 97 WebSocket Server Goal: Send & Receive A Closure Frame Lecture 98 Setting up project code and defining our mini-goal Lecture 99 Closing handshake Lecture 100 Extracting the body (closure code and reason) of the close frame Lecture 101 Both peers have to send a close frame Lecture 102 Close Frame Structure Lecture 103 Construct the payload buffer for the close frame Lecture 104 Closure codes Lecture 105 Completing and sending the final close frame back to the client Lecture 106 Testing our code Lecture 107 Using Wireshark to master the TCP closure process Lecture 108 Checking for "ping" and "pong" data type, and payloads larger than max size Lecture 109 Ping and Pong Lecture 110 Ping & Poing vs TCP Keepalive Lecture 111 Extracting the server response from the CloseEvent object Lecture 112 Sending a closure frame if the masking bit is not set correctly by the client Lecture 113 Check whether client has sent a closure code Lecture 114 Displaying default closure message (for normal closure event) Lecture 115 Fixing comments and removing server response text when new connection is made Lecture 116 Server side validation for text Lecture 117 Fixing the refresh issue killing the server Lecture 118 Project Files: Dealing with Closure Frames Developers interested in learning the art and science behind building a native WebSocket server,Developers interested in mastering the WebSocket protocol and dealing with large chunks of data,Anyone interested in learning the art and science behind creating a WebSocket framework,BUSY PEOPLE who want to become certified and confident about what it takes to build a WebSocket server from scratch,Freelancers who want to learn how to become an effective developer at creating real-time applications,YES: This course is for intermediates. It's aimed at people who have some knowledge of WebSockets, but want to dig deeper,Those who want to learn modern coding without third party libraries and frameworks |