Implementation of COMET Clients

I read what COMET streaming is, and all kinds of hacks needed to work in major browsers. The problems that appear are twofold: 1. The server can support many permanent connections. 2. Implementation of the JS function

I have an application where I need to execute COMET threads. I already covered the first problem above - I have a user server that delivers updates when it arrives in pieces. Now I want to connect using JS to this URL in order to receive updates.

Is there a simple COMET library that I can use for this? I saw the Orbited project. Can I use client side JS to accomplish this? What modifications do I need to do in the backend for this?

+6
javascript comet streaming
source share
1 answer

If the server code can meet the Bayeux specification, you can use any existing javascript implementation cometomes currently available in DOJO and jQuery. Unfortunately, the specification is quite complicated, especially if you want to do both a lengthy poll and a callback. Perhaps you better just start an existing cometd server, such as Jetty, and then write a client library for your server code to output data to it.

+3
source share

All Articles