1

Well, I have doubts about this technology, more precisely in its implementation, can not find good examples on the Internet, as it involves javascript and php, only, you would have some links where I can find this stuff really works and that ?

Roger Far
  • 2,178
  • 3
  • 36
  • 67
  • Check out this wiki article: http://en.wikipedia.org/wiki/Push_technology – DwB Dec 15 '11 at 22:48
  • I found this .. but don't understand the logic .. http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/ –  Dec 15 '11 at 22:49

4 Answers4

5

A great source for all things Comet is Comet Daily. Unfortunately it's not updated all that often any more but there are some fantastic old articles in there. It's contributed to by guys that have been developing Comet solutions for over 10 years.

Comet seems to get incorrectly bundled as meaning just one particular connection mechanism is used, but it's actually a paradigm for realtime push from server to client. Comet servers can use HTTP Streaming, HTTP Long-Polling, classic polling and WebSockets.

If you are interested in the latest Push Technology then you should take a look at WebSockets which is a standardised approach to not only server to client push, but also bi-directional realtime communication between servers and clients (web browsers and other clients).

Some current trending push technologies are:

  • socket.io
  • Hosted WebSockets services such as Pusher - who I work for
  • Faye for self hosted Ruby or Node dev
  • SignalR for IIS and .NET
  • There are many more and more information on realtime web technologies can be found on this guide.

If you want to use PHP you could struggle to build an application using realtime Push which will scale above a small number of connections. Have a read through this question on concurrency - How to implement event listening in PHP for more information.

Community
  • 1
  • 1
leggetter
  • 15,248
  • 1
  • 55
  • 61
  • Phil is way to modest and polite. Go with Pusher and be done with it. Amazing simple tool with great support. IMO, there is no reason to mess with Comet/etc these days. – Scott Watermasysk Dec 16 '11 at 15:25
1

Do you specifically mean Ajax push? Because a more common method is comet push, I has been a while I worked with this, probably more browsers support this.

A good implementation can be found here: http://www.ape-project.org/

Well it's called Ajax Push engine, so I suppose that is what you are looking for.

Roger Far
  • 2,178
  • 3
  • 36
  • 67
  • Yes .. it's Ajax Push, Long Polling. –  Dec 15 '11 at 22:50
  • I think the APE project is a combination of comet and longpolling, when a browser does not support comet (open connections) it will revert to long polling, what effectively does the same. – Roger Far Dec 15 '11 at 22:51
1

If you work with Java/Scala/Ruby/Groovy, take a look at Atmosphere, which is being actively developed/used (I'm the creator). There are many samples available.

Sheena
  • 15,590
  • 14
  • 75
  • 113
jfarcand
  • 1,705
  • 9
  • 6
0

Check out the Bayeux Protocol and CometD implementation in Java & Javascript.

From http://cometd.org/ : CometD is a scalable HTTP-based event routing bus that uses a Ajax Push technology pattern known as Comet.

Here the link to an interesting article describing the technologies involved and a comparison of CometD and Atmosphere implementations.

perissf
  • 15,979
  • 14
  • 80
  • 117