PHP long polling, without excessive database access

前端 未结 6 1325
無奈伤痛
無奈伤痛 2021-01-02 17:26

I\'ve always enjoyed the idea of long polling; on my development server I\'ve played with various notification / new post systems, each using javascript to hold a connection

6条回答
  •  抹茶落季
    2021-01-02 18:01

    I would use some nosql to notify there is new data. Redis has pub/sub and a blocking list.

    You can also use, for example, memcache and create a new key when the data is available.

提交回复
热议问题