reading-notes

View the Project on GitHub TrunkOfUkuleles/reading-notes

Questions

  1. What does it mean that web sockets are bidirectional? Why is this useful? it allows for the near instant transfer of information between a client and server without a generated call each time. This means real time updating with the server.
  2. Does socket.io use HTTP? Why? It uses it as HTTP is one of teh core layers it is built on. Or more specifically, TCP Socket.io is based on the 4th layer, but can integrate over and with HTTP.
  3. What happens when a client emits an event? depending on where it is directed, the event will be “braodcast” to the server and room/namespace it is in.
  4. What happens when a server emits an event? it will emit to all the sockets by default, but can be directed to a room/namespace
  5. What happens if a client “misses” an event? without handling and tracking the event then passes
  6. How can we mitigate this? probably chain emmit notices like we would with HTTP calls, but they can be quick and mainly for tracking. If the response emmit does not occur, keep the event in an object to be referenced later

Vocab

Socket - open connection between a browser and server Web Socket - protocol for passing data between browser and server via a bidirectional communication. Socket.io - JS library for realtime web apps Client - the side that is requesting Server - the one fulfilling the request OSI Model - Open Systems Interconnection model, standard of communication the web is based upon. 7 layered burrito TCP Model - 4 layer version of the OSI (oversimplification). uses the OSI transport layer. TCP - Transmission Control Protocol UDP - User Datagram Protocol - send datagrams! No handshakes! Packets - data objects to be passed through IP

Preview

Which 3 things had you heard about previously and now have better clarity on? socket.io, TCP, OSI Which 3 things are you hoping to learn more about in the upcoming lecture/demo? different approaches to how to come at a problem using these tools. What are you most excited about trying to implement or see how it works? real time apps - I want to see the edges of where JS can take me