How to show continuous real time updates like facebook ticker, meetup.com home page does?

后端 未结 4 1012
抹茶落季
抹茶落季 2020-12-14 12:26

How to show continuous real time updates in browser like facebook ticker, meetup.com home page does? In python, PHP, node.js and what would be the performance impact at the

4条回答
  •  余生分开走
    2020-12-14 13:14

    You could use a poll, long-poll or if you want a push system. Easiest would be a poll. However, all solutions require client side coding.

    Performance impact depends on your solution. Easiest to implement would be a poll. A poll with short frequency does effectively a request every, say 100ms ot simulate real time. A long-poll would be of less impact, but it would keep open a lot of request during a more or less time.

提交回复
热议问题