Long Polling、Sever-Sent Events 和 WebSocket 是实现real-time application的3种常用手段。
哪一种最好,取决于具体情况。
如果还不熟悉话,可以看看这篇文章 。