Prosté HTTP je request/response: klient se ptá, server odpovídá, hotovo. To se špatně hodí pro real-time funkce (chat, živé dashboardy, notifikace, kolaborativní editace), kde server potřebuje posílat data, kdykoli má něco nového. Možnosti jsou způsoby, jak obejít model HTTP iniciovaný klientem, na spektru složitosti:
Long-polling client ──req──▶ server ...holds... ──resp──▶ then immediately re-asks
(near-real-time over plain HTTP; one message per held request)
SSE client ──req──▶ server ═══stream of events═══▶ (one-way, server→client)
(HTTP-based, text, auto-reconnect; NO client→server on same channel)
WebSocket client ──handshake──▶ server ══full-duplex, both directions══▶
(persistent TCP; low overhead; binary or text; you build the rest)
