PHPweb message push problems

Source: Internet
Author: User
PHPweb message push PHP & nbsp; web message push internal system I use long polling to push messages & nbsp; the whole website is slow. Is there a solution to the PHP web message push problem?
PHP web message push
Internal systems
I use long polling to push messages. the whole website is very slow.
Is there any solution to share it:
------ Solution --------------------
Many websites are not slow when polling is used. how can this problem be described in detail? The value of the frequency pass-through in polling
------ Solution --------------------
This is a websocket server implemented by php.
Https://github.com/cboden/Ratchet
------ Solution --------------------
In short, the client regularly sends messages to the server. Heartbeat is good. Long polling is not required for internal use.
------ Solution --------------------
Generally, ajax round-robin is enough.
If you feel the speed is slow, check whether your algorithm is suitable (the polling frequency is too high, and there are too many repeated computations in each round)

Server pushing requires technical support from both the client and server.
Http-based server pushing is only supported by the netscape browser, but the browser is still out of the historical stage.
Server pushing based on the websock protocol. the client supports HTML5 browsers, and the server is generally Node. js.
Php does not have related components. if it is implemented using code, it has no practical value.
Besides, the HTML5 browser is being upgraded. The sample code that can be searched on the Internet cannot work without exception.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.