CLASS 12
SOCKET.IO
REVIEW, RESEARCH AND DISCUSS
What is the benefit of transforming data into packets?
- Packets are intended to transfer data reliably and efficiently. Instead of transferring a large file as a single block of data, sending smaller packets helps ensure each section is transmitted successfully.
UDP is often refereed to as a connectionless protocol. Why is this?
- User Datagram Protocol enables the transfer of data before an agreement is provided by the receiving party.
Can a socket server application have multiple socket connections?
- Yes as long as they are associated with different clients and the server woul be able to handle as many clients as available system resources allow it to.
Can a socket connection application be connected to multiple socket servers?
- No
Can an application be both a socket server and a socket connection?
- Yes
TERMS:
Observer Pattern
The Observer Pattern is a popular pattern used across all sorts of JavaScript applications where the instance maintains a collection of observers and notifies them when changes to the state occurs.
listner
- A listnesr is a function that listnens for events to occur.
Event Handler
- Event Handler is a function fired by listner functions.
Event Driven Programming
- Event driven programming is the way of programming that follows events.
Event Loop
- An Event Loop continuously checks the call stack to see if there’s any function that needs to run.
Event Queue
- An event queue is a repository where events from an application are held prior to being processed by a receiving program or system
Call Stack
- Call stack is a data structure which records the function calls, basically where in the program we are.
Emmit/raise/trigger
- Emmit sends a message to trigger another event.
Subscribe
- Is a method waiting for for publisher to happen.
Database
- A database is an organized collection of data, generally stored and accessed electronically from a computer system