php - Real time web update client to client - Stack Overflow

I'm so curious real time web application like Facebook uses (eg. Friends Notifications) My questio

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
Add a ment  | 

10 Answers 10

Reset to default 1

Also 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745460139a4628670.html

相关推荐

  • php - Real time web update client to client - Stack Overflow

    I'm so curious real time web application like Facebook uses (eg. Friends Notifications) My questio

    9小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信