> For the complete documentation index, see [llms.txt](https://justin-se.gitbook.io/justin-se-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://justin-se.gitbook.io/justin-se-docs/backend/network/datatransmotprotocols.md).

# Data Transmission Protocol

categorise by <https://en.wikipedia.org/wiki/OSI\\_model>

Transmission layer

## TCP

Transmission Control Protocol

most widely used web protocol

Application Layer

### HTTP / HTTPS

"Hyper Text Transfer Protocol "

build on top of **TCP**.

request-response design.

most common used protocol on web app.

with SSL/TSL encrypted, it will become **HTTPS** (Hyper Text Transfer Protocol Secured)

[Transport Layer Security](https://en.wikipedia.org/wiki/Transport_Layer_Security)

### Web Socket (WS)

build on top of **TCP**.

continuous data stream, real-time communication.

**Low Resource cost to stream data.**

* onec WS establish with **Handshake**, it take smaller amount of data than http to make data stream.
* most of WS implement **Heartbeat** to close connection that is not active.

**Use Case**

* stock data, flight data streaming.
* realtime communication app like whatsapp, discord etc.

[WebSocket](https://en.wikipedia.org/wiki/WebSocket)

[Heartbeat (computing)](https://en.wikipedia.org/wiki/Heartbeat_\(computing\))

### FTP

File Transfer Protocol

idk much about this, i use filezilla.

others like udp i forgot ady.
