సాదా HTTP అనేది request/response: client అడుగుతుంది, server సమాధానం ఇస్తుంది, అయిపోయింది. అది real-time features (chat, live dashboards, notifications, collaborative editing)కు సరిపోదు, ఇక్కడ serverకు కొత్తది ఉన్నప్పుడల్లా data push చేయాల్సి ఉంటుంది. ఈ ఎంపికలు HTTP client-initiated modelను దాటవేసే మార్గాలు, complexity spectrum వెంట:
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)
