ਸਾਦਾ HTTP request/response ਹੈ: client ਪੁੱਛਦਾ ਹੈ, server ਜਵਾਬ ਦਿੰਦਾ ਹੈ, ਖ਼ਤਮ। ਇਹ real-time features (chat, ਲਾਈਵ dashboards, notifications, collaborative editing) ਲਈ ਮਾੜਾ fit ਹੈ ਜਿੱਥੇ server ਨੂੰ ਜਦੋਂ ਵੀ ਕੁਝ ਨਵਾਂ ਹੋਵੇ data push ਕਰਨ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ। ਵਿਕਲਪ HTTP ਦੇ client-ਸ਼ੁਰੂ ਕੀਤੇ ਮਾਡਲ ਦੇ ਆਲੇ-ਦੁਆਲੇ ਦਾ ਰਾਹ ਲੱਭਣ ਦੇ ਤਰੀਕੇ ਹਨ, ਗੁੰਝਲਦਾਰੀ ਦੇ ਇੱਕ ਵਰਣਪਟ ਦੇ ਨਾਲ:
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)
