Want to use Swoole to do a message notification, such as have unread comments, private messages ...
Like the official website, at the top you will be prompted to have a few unanswered questions about your needs.
Then I saw the next swoole. Can take advantage of HTML5 latest WebSocket features to do, it is simple, is to consider that WebSocket does not support IE browser, do not know that we use swoole there is no better way to achieve compatibility.
Thank you
Reply content:
Want to use Swoole to do a message notification, such as have unread comments, private messages ...
Like the official website, at the top you will be prompted to have a few unanswered questions about your needs.
Then I saw the next swoole. Can take advantage of HTML5 latest WebSocket features to do, it is simple, is to consider that WebSocket does not support IE browser, do not know that we use swoole there is no better way to achieve compatibility.
Thank you
Swoole can be made a gateway to support long connections, HTTP polling, WebSocket, and then use Redis as a query service can be
Segmentfault is using AJAX timed polling
Can try Phpsocket.io, interface super simple, compatible with all browsers
Swoole or Wokerman do socket server, front end with Socket.io.js, the advantage is will automatically do compatible,
Swoole do this is not a problem, just hope that the landlord after the completion of the code can be dedicated to git, because the entire swoole environment documents lack, the actual case lack, resulting in a lot of people deterred.
Incompatible is websocket, and swoole service is irrelevant
You can also use the pure Redis mode directly, whenever a new request is published, Redis publishes the message, and the client subscribing to the channel receives a prompt in the interface.
IE, the front-end introduction of Socket.io can be achieved automatically degraded, not very complex, back-end logic does not need to change
First of all, I'm surprised what kind of business needs such real-time notifications,
Second, from the technical realization, if only IE does not support the words can be used by flash, the market basically so dry.
Of course there are other options, like the Wokerman upstairs, and Swoole.