There are now two requirements for comet: 1. There are new users asking questions, the web interface automatically pops up a question. 2. The number of questions under a tag increases by 1. The total number of web interface tags is automatically increased by 1. In fact, it does not take into account the server pressure. without too much consideration for compatibility, how to press the server... is comet.
There are two requirements to implement
1. When a new user asks a question, a question is automatically displayed on the web interface.
2. The number of problems under a tag increases by 1. The total number of web interface tags is automatically increased by 1.
In fact, you can do it without considering the server pressure.
How to minimize the server pressure without too much consideration for compatibility
Html5 available
Reply content:
Is comet.
There are two requirements to implement
1. When a new user asks a question, a question is automatically displayed on the web interface.
2. The number of problems under a tag increases by 1. The total number of web interface tags is automatically increased by 1.
In fact, you can do it without considering the server pressure.
How to minimize the server pressure without too much consideration for compatibility
Html5 available
PHP web message push framework
Ready-made open-source products can be used directly and are easy to use.
Based on websocket, it is automatically converted to comet when websocket is not supported, non-round training, good performance
Demo: click here to view the web message push demo
Currently, I have tried two websocket-based frameworks, swoole and workerman. You can also try them.
Websocket
The segmentfault notification is that the webpage client initiates a request every minute to pull data.
The idea of a project is to pull data once each time a user initiates a GET or POST request.