Code Monkey home page Code Monkey logo

chat-app's Introduction

Description

This is my research on Web Sockets. I wanted to make a chat application but I noticed that AJAX request is not great for it. The server is not built to automatically send data to client when there is new data. I talked to fellow coders about it and they said the key is Web Sockets. I thought it would be rewarding to research about Web Sockets on General Assembly's Conference Day!

I made a powerpoint to teach my fellow coders at General Assembly about Web Sockets. The link to the presentation is here: https://docs.google.com/presentation/d/1NDeNy7QdpNirilsnmPw_U5Rth-0u_yRCJIfrTOKhOcM/edit?usp=sharing

Introduction to Web Sockets

According to MDN, "Web Sockets is an advanced technology that makes it possible to open an interactive communication session between the user's browser and a server." Each individual connection between the client and server is called a socket. You can set up so that the server can automatically send data to clients when there is new data.

Why AJAX Sucks with Real Time Data

You have to keep sending GET AJAX request to the server to see if there is new information. You can set a timer to send an AJAX request, but that would not be scalable. The design of AJAX request is not suited for real time data dependent application.

Tools out there for Web Sockets

  • Socket.io
  • WS
  • uWebSockets
  • Total.js

Resources

Chat APP From The Net Ninja: https://www.youtube.com/playlist?list=PL4cUxeGkcC9i4V-_ZVwLmOusj8YAUhj_9

WebSockets MDN https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API

chat-app's People

Contributors

kailinc avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.