Web Real‑Time Message Push: Techniques and Choosing Comet with Tornado
This article reviews various web real‑time message push techniques—including polling, long‑polling, iframe streaming, socket plugins, and WebSocket—evaluates their pros and cons, and explains why the author selected the Comet approach implemented with the Python Tornado framework for a web push system.
Background: The platform already supports real‑time push for PC and mobile using native sockets; now a web push solution is needed.
Possible web push technologies are examined: continuous polling (simple server logic but high load), long‑polling (high real‑time, holds connections), iframe/HTMLFile streaming (real‑time but resource‑intensive), socket plugins (native socket support but require client plugins), and WebSocket (full‑duplex, efficient but limited browser support).
Evaluation of each method’s advantages, disadvantages, and typical applications is presented.
Technology selection: Based on familiarity with Comet (which encompasses long‑polling and iframe streaming) the author decides to adopt Comet for web push.
Web framework choice: To avoid reinventing the wheel, a Python‑based Comet implementation is selected, specifically the Tornado framework, which integrates well with the existing testing scripts.
Reference: The article cites “Comet: HTTP long‑connection server push technology” for further reading.
Architect
Professional architect sharing high‑quality architecture insights. Topics include high‑availability, high‑performance, high‑stability architectures, big data, machine learning, Java, system and distributed architecture, AI, and practical large‑scale architecture case studies. Open to ideas‑driven architects who enjoy sharing and learning.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.