admin管理员组文章数量:1425997
I'm so curious real time web application like Facebook uses (eg. Friends Notifications) My question is what particular javascript code or existing framework I can use if theres any existing out there. Regards
I'm so curious real time web application like Facebook uses (eg. Friends Notifications) My question is what particular javascript code or existing framework I can use if theres any existing out there. Regards
Share Improve this question asked Jun 14, 2013 at 4:51 Bruce Elenois McGravy Bruce Elenois McGravy 871 silver badge6 bronze badges 1- Take a look at Comet (en.wikipedia/wiki/Comet_(programming)). There's SignalR for .NET – Jude Cooray Commented Jun 14, 2013 at 4:53
10 Answers
Reset to default 1Also have a look at websockets.
A description: http://www.html5rocks./en/tutorials/websockets/basics/
And a framework to use: http://socket.io/
That technique called as server push.Among them Comet is widley used and for PHP
Pusher – Who I work for-
Here is the real time list
Messaging: with focus on delivery to clients (e.g. Web Browsers)
The easiest way to access this technology is to use a framework. We have used http://www.pusher. in some projects with good results.
This project is very nice, too:
http://socketo.me/
and its pure php
also have look at this its long polling its very simpele but its not better then socket.io http://www.screenr./SNH
There is http://www.asp/signalr, it uses the best service for the connection, e.g. If websocket is available, then it'll use websocket, othwerwise it will use other techniques like polling (the worst technique).
Another one is http://nodejs/, I don't know how it works, but it seems a good option. I think it uses websocket too.
Facebook Friends Notifications uses push technology.
Push, or server push, describes a style of Internet-based munication where the request for a given transaction is initiated by the publisher or central server. It is contrasted with pull, where the request for the transmission of information is initiated by the receiver or client.
You can read more about the way it works technically using Comet following this link.
Another solution is AngularJS (http://anuglarjs). This is a newer technology developed by someone within Google and seems to hold many promises in web application development.
Meteor JS is also a nice library for realtime updates.
I would advice you to use setinterval() in JS, and an ajax function to check if there are new messages in your database (not seen by the current user), if so show them as new. PP: you'll need to get to know some jquery and php, but overall creating it yourself gives you all the flexibility and a lot easier bug fixing
本文标签: phpReal time web update client to clientStack Overflow
版权声明:本文标题:php - Real time web update client to client - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745460138a2659286.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论