AJAX/Reverse AJAX: Polling or Push?

依然范特西╮ 提交于 2019-12-03 13:50:21
leggetter

Do specific hosting providers host push server for you? Is there a way to get a server without having to host it? It seems like a much better choice over polling, but at the same time it seems extremely confusing.

Yes, I work for Pusher who offer such a service. You can see a quickstart guide here. There are also other realtime hosted services that you could read up on.

I'd also recommend you have a look at:

My opinion, as expressed in the first link, is that PHP isn't a good technology for realtime web applications. You are best to either have different components that you use as your realtime web infrastructure. That should either be something self-installed or a hosted solution such as Pusher, who I work for. Why? PHP + Apache wasn't built for maintaining long running connections. There are PHP standalone WebSocket solutions you could look at, but you are 80% likely to be using Apache and 20% nginx which doesn't support WebSockets quite yet (but will soon). Even then, I'm not sure how they'll integrate with the standard PHP request/response application flow.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!