├── .prettierrc ├── static ├── author.jpg ├── courseImage.png ├── posterframe.jpg ├── corner-image-active.svg └── corner-image-inactive.svg ├── lessons ├── images │ ├── brian.jpg │ ├── lunasit.jpg │ ├── brian-beer.jpg │ ├── FrontendMastersLogo.png │ └── logo.svg ├── intro-to-websockets.md ├── polling.md ├── polling-with-settimeout.md ├── polling-backend.md ├── intro-to-socketio.md ├── conclusion.md ├── requestanimationframe.md ├── intro-to-http2-push.md ├── the-project.md ├── intro.md ├── backoff-and-retry.md ├── chat-with-socketio.md ├── chat-with-http2-push.md └── websockets-backend.md ├── .editorconfig ├── .gitignore ├── src ├── pages │ ├── 404.js │ └── index.js ├── layouts │ ├── variables.css │ ├── Footer.css │ ├── linkedin-social.svg │ ├── twitter-social.svg │ ├── Footer.js │ ├── corner-image.svg │ ├── github-social.svg │ ├── index.js │ └── index.css ├── util │ └── helpers.js ├── components │ └── TOCCard.js └── templates │ └── lessonTemplate.js ├── .github └── workflows │ └── gatsby.yml ├── .eslintrc.json ├── gatsby-node.js ├── README.md ├── package.json ├── gatsby-config.js ├── csv.js └── LICENSE /.prettierrc: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /static/author.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btholt/complete-intro-to-realtime/HEAD/static/author.jpg -------------------------------------------------------------------------------- /static/courseImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btholt/complete-intro-to-realtime/HEAD/static/courseImage.png -------------------------------------------------------------------------------- /static/posterframe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btholt/complete-intro-to-realtime/HEAD/static/posterframe.jpg -------------------------------------------------------------------------------- /lessons/images/brian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btholt/complete-intro-to-realtime/HEAD/lessons/images/brian.jpg -------------------------------------------------------------------------------- /lessons/images/lunasit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btholt/complete-intro-to-realtime/HEAD/lessons/images/lunasit.jpg -------------------------------------------------------------------------------- /lessons/images/brian-beer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btholt/complete-intro-to-realtime/HEAD/lessons/images/brian-beer.jpg -------------------------------------------------------------------------------- /lessons/images/FrontendMastersLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btholt/complete-intro-to-realtime/HEAD/lessons/images/FrontendMastersLogo.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Project dependencies 2 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 3 | node_modules 4 | .cache/ 5 | # Build directory 6 | public/ 7 | .DS_Store 8 | yarn-error.log 9 | -------------------------------------------------------------------------------- /src/pages/404.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const NotFoundPage = () => ( 4 |
You just hit a route that doesn't exist... the sadness.
7 |
9 | The Complete Intro to Realtime, as taught by Brian Holt for Frontend Masters 10 |
11 | 12 | [][fem] 13 | 14 | [Please click here][course] to head to the course website. 15 | 16 | # Issues and Pull Requests 17 | 18 | Please file issues and open pull requests here! Thank you! For issues with project files, either file issues on _this_ repo _or_ open a pull request on the projects repos. This repo itself is the course website. 19 | 20 | # Project Files 21 | 22 | [Please go here][project] for the project files. 23 | 24 | # License 25 | 26 | The content of this workshop is licensed under CC-BY-NC-4.0. Feel free to share freely but do not resell my content. 27 | 28 | The code, including the code of the site itself and the code in the exercises, are licensed under Apache 2.0. 29 | 30 | # Attributions 31 | 32 | Icons made by Freepik from www.flaticon.com 33 | 34 | [fem]: https://frontendmasters.com/ 35 | [course]: https://btholt.github.io/complete-intro-to-realtime 36 | [project]: https://github.com/btholt/realtime-projects/ 37 | -------------------------------------------------------------------------------- /src/layouts/Footer.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { graphql, StaticQuery } from "gatsby"; 3 | import Gh from "./github-social.svg"; 4 | import Tw from "./twitter-social.svg"; 5 | import Li from "./linkedin-social.svg"; 6 | 7 | import "./Footer.css"; 8 | 9 | export default function Footer({ twitter, linkedin, github }) { 10 | return ( 11 | 46 | ); 47 | } 48 | -------------------------------------------------------------------------------- /static/corner-image-active.svg: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /src/layouts/corner-image.svg: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /static/corner-image-inactive.svg: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /lessons/intro-to-websockets.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/intro-to-websockets" 3 | title: "Intro to WebSockets" 4 | order: "4A" 5 | description: "" 6 | section: "WebSockets By Hand" 7 | icon: "hand-holding-heart" 8 | --- 9 | 10 | Let's get into true realtime: WebSockets. WebSockets are a primitive built into both browsers and backends alike that allow to us to have a long-running connection that allows clients to push data to servers and servers to push data to clients. As opposed to long-polling where we had a client that requesting and posting data to and from a server over many small connections, a WebSocket is one long-running connection where servers can push data to clients and vice versa. This is true realtime because it allows both sides to engage in realtime communication. 11 | 12 | So how do this connections work? We're going to implement a WebSocket connection by hand, getting down into the binary frames being sent back and forth between your server and the browser. Why? You would never actually write this code yourself. But, just like [in my containers course][containers] where we build containers by hand to see how they actually work, we are actually going to build it so we can understand what underpins the technology. While you may never need to build it yourself, it will make you a better programmer to know how the tool works and you'll be grateful for the abstraction when you use it because you'll understand the complexity it is shielding you from. 13 | 14 | So let's begin by getting our chat app working with sockets we build by hand. 15 | 16 | [containers]: https://frontendmasters.com/courses/complete-intro-containers/ 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gatsby-course-starter", 3 | "description": "a gatsby seed project to get your education site started", 4 | "version": "1.0.0", 5 | "author": "Brian Holt