Nicely done! I knew nothing about websockets before this. Now I feel like I have a basic understanding. You could read some documentation and articles for 10-20 minutes or you could watch this 2 minute video. I'll go with the video.
man I come to each of your videos expecting about x100 more views than what they have - IF I EVER MAKE IT, I'M GOING TO REDESIGN THE TH-cam ALGORITHM TO ENACT JUSTICE ON YOUR VIDEOS BC THEY'RE CRIMINALLY UNDERRATED
haha thank you bro I'm not really trying to "optimize" my videos in a certain format to get more likes, I'm just trying to provide information that inspires and is useful
I'm a product owner with some dev background. We're working on a realtime online game in our company and I need more information about tcp, udp, ws, etc. Are they protocol or way of transporting data or are they just a format to shape the data before sending them to server? I don't know where to begin knowing about these stuff or how do I get up to speed.
ChatGPT is a great place to start when you have questions like this! I would recommend starting there, and then diving into specific technical documentation if you need to understand something in further depth. From ChatGPT: TCP, UDP, and WebSocket (WS) are all communication protocols used in networking, and they define how data is transmitted between devices over a network. They are not just formats for shaping data; they provide specific rules and mechanisms for data transmission. Here's an overview of each: TCP (Transmission Control Protocol): Protocol: TCP is a communication protocol. Purpose: It is used for reliable, connection-oriented communication between two devices on a network. Features: Reliability: TCP ensures that data sent from one end is received correctly and in the same order at the other end. It handles retransmission of lost or corrupted packets. Connection-Oriented: TCP establishes a connection between two devices before data transfer and ensures a proper teardown of the connection afterward. Flow Control: TCP includes mechanisms to control the rate of data transmission to prevent overwhelming the receiving end. Use Cases: TCP is commonly used for applications that require reliable and ordered data delivery, such as web browsing, email, file transfer (FTP), and remote desktop. UDP (User Datagram Protocol): Protocol: UDP is a communication protocol. Purpose: It provides a lightweight, connectionless communication option that is faster but less reliable than TCP. Features: Connectionless: UDP does not establish a connection before sending data and doesn't guarantee that data will be received in order or at all. Low Overhead: It has lower overhead compared to TCP because it lacks the additional mechanisms for reliability and flow control. Speed: UDP is often used in applications where speed is more important than reliability, such as real-time video streaming and online gaming. Use Cases: UDP is suitable for scenarios where a slight loss of data is acceptable, and low latency and fast data transmission are crucial. WebSocket (WS): Protocol: WebSocket is a communication protocol. Purpose: It provides full-duplex, bidirectional communication over a single, long-lived connection, overcoming the limitations of request-response protocols like HTTP. Features: Full-Duplex: Both the client and server can send messages to each other simultaneously without the overhead of establishing new connections for each message. Low Latency: WebSockets reduce latency and overhead compared to traditional HTTP, making them suitable for real-time applications like chat, online gaming, and collaborative tools. Use Cases: WebSockets are used when you need low-latency, real-time, or interactive communication between a client (e.g., web browser) and a server. They are often used in web applications and services for features like chat, notifications, and live updates. In summary, TCP, UDP, and WebSocket are networking protocols that determine how data is transmitted, the level of reliability, and the nature of the connection between devices. They are not just data formatting methods; they define how devices communicate over a network. The choice of protocol depends on the specific requirements of your application, such as reliability, speed, and real-time capabilities.
@@codetour thank you. I use chatGPT a lot, mostly for repetitive and tedious works. I have never thought about using it for this kind of knowledge. I'll surely try it.
I've got a comment. I wish you would put out more videos, more regularly.
very informative as usual
Nicely done! I knew nothing about websockets before this. Now I feel like I have a basic understanding. You could read some documentation and articles for 10-20 minutes or you could watch this 2 minute video. I'll go with the video.
man I come to each of your videos expecting about x100 more views than what they have - IF I EVER MAKE IT, I'M GOING TO REDESIGN THE TH-cam ALGORITHM TO ENACT JUSTICE ON YOUR VIDEOS BC THEY'RE CRIMINALLY UNDERRATED
haha thank you bro I'm not really trying to "optimize" my videos in a certain format to get more likes, I'm just trying to provide information that inspires and is useful
Great explanatory video. Saw you on TikTok now follow you here!
nice video thanks mate
I'm a product owner with some dev background. We're working on a realtime online game in our company and I need more information about tcp, udp, ws, etc. Are they protocol or way of transporting data or are they just a format to shape the data before sending them to server?
I don't know where to begin knowing about these stuff or how do I get up to speed.
ChatGPT is a great place to start when you have questions like this! I would recommend starting there, and then diving into specific technical documentation if you need to understand something in further depth. From ChatGPT:
TCP, UDP, and WebSocket (WS) are all communication protocols used in networking, and they define how data is transmitted between devices over a network. They are not just formats for shaping data; they provide specific rules and mechanisms for data transmission. Here's an overview of each:
TCP (Transmission Control Protocol):
Protocol: TCP is a communication protocol.
Purpose: It is used for reliable, connection-oriented communication between two devices on a network.
Features:
Reliability: TCP ensures that data sent from one end is received correctly and in the same order at the other end. It handles retransmission of lost or corrupted packets.
Connection-Oriented: TCP establishes a connection between two devices before data transfer and ensures a proper teardown of the connection afterward.
Flow Control: TCP includes mechanisms to control the rate of data transmission to prevent overwhelming the receiving end.
Use Cases: TCP is commonly used for applications that require reliable and ordered data delivery, such as web browsing, email, file transfer (FTP), and remote desktop.
UDP (User Datagram Protocol):
Protocol: UDP is a communication protocol.
Purpose: It provides a lightweight, connectionless communication option that is faster but less reliable than TCP.
Features:
Connectionless: UDP does not establish a connection before sending data and doesn't guarantee that data will be received in order or at all.
Low Overhead: It has lower overhead compared to TCP because it lacks the additional mechanisms for reliability and flow control.
Speed: UDP is often used in applications where speed is more important than reliability, such as real-time video streaming and online gaming.
Use Cases: UDP is suitable for scenarios where a slight loss of data is acceptable, and low latency and fast data transmission are crucial.
WebSocket (WS):
Protocol: WebSocket is a communication protocol.
Purpose: It provides full-duplex, bidirectional communication over a single, long-lived connection, overcoming the limitations of request-response protocols like HTTP.
Features:
Full-Duplex: Both the client and server can send messages to each other simultaneously without the overhead of establishing new connections for each message.
Low Latency: WebSockets reduce latency and overhead compared to traditional HTTP, making them suitable for real-time applications like chat, online gaming, and collaborative tools.
Use Cases: WebSockets are used when you need low-latency, real-time, or interactive communication between a client (e.g., web browser) and a server. They are often used in web applications and services for features like chat, notifications, and live updates.
In summary, TCP, UDP, and WebSocket are networking protocols that determine how data is transmitted, the level of reliability, and the nature of the connection between devices. They are not just data formatting methods; they define how devices communicate over a network. The choice of protocol depends on the specific requirements of your application, such as reliability, speed, and real-time capabilities.
@@codetour thank you. I use chatGPT a lot, mostly for repetitive and tedious works. I have never thought about using it for this kind of knowledge. I'll surely try it.