সাধারণ HTTP হলো request/response: client জিজ্ঞেস করে, server উত্তর দেয়, শেষ। এটি real-time ফিচারের (chat, live dashboard, notification, collaborative editing) জন্য দুর্বলভাবে মানানসই, যেখানে server-এর যখনই নতুন কিছু থাকে তখনই ডেটা 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)
