Network Protocols · Tiếng Việt

Protocol Lab

Tài liệu deep-dive và live demos về các network protocol.
Từ wire format đến production patterns — không chỉ "nó làm gì" mà "tại sao".

5
Deep Dives
3
Live Demos
83
Sections
100+
Code Examples

Tài liệu

Protocol Deep Dives

Mỗi bài viết theo hướng bottom-up — wire format trước, abstractions sau. Có diagram SVG, bảng so sánh, và code ví dụ cho mỗi concept.

💡

Gợi ý thứ tự học: Mỗi bài độc lập, nhưng nếu mới bắt đầu hãy đọc theo thứ tự HTTP → gRPC → WebSocket → WebRTC → MQTT. Hiểu TCP và HTTP/1.1 trước giúp mọi bài sau dễ hơn rất nhiều.

Live Demos

Demo Apps

Ứng dụng thực tế minh hoạ các protocol trong action. Static demos chạy trực tiếp trên GitHub Pages; Node.js demos cần chạy server riêng.

So sánh

Chọn protocol phù hợp

Tổng quan nhanh — khi nào dùng cái nào.

Protocol Comparison

Tiêu chí HTTP gRPC WebSocket WebRTC MQTT
Transport TCP / QUIC TCP (HTTP/2) TCP UDP (ICE) TCP
Mô hình Req / Resp RPC + Stream Full-duplex P2P Pub / Sub
Overhead Medium Thấp Rất thấp Cao (setup) Tối thiểu
Binary? H2/H3: Yes Yes (Protobuf) Tuỳ chọn Yes (SRTP) Yes
Server cần? Origin server gRPC server WS server Signaling only MQTT broker
Dùng khi REST API, CDN Microservices Chat, live UI Video / P2P IoT, drone