tags:

views:

503

answers:

2

Ok, I am looking to implement COMET, and I stumbled on this page comparing the various options:

http://cometdaily.com/maturity.html

Under the "Transports", they are using this term "Callback-Polling" - what is callback polling? I know what is normal polling, and long polling, but what is callback polling?

A: 

So once you've established a connection with a server with a simple ajax-request, server can make a fast response and close connection.

And the idea of commet is on not closing this connection and sending data through it. This data could be a javascript that would be evaluated on the client side.

Also it could be a javascript that will open new connection when the time comes. And a think this is a callback polling - when pooling from the client is initiated on the server side.

Andrew Dashin
+1  A: 

Callback polling is a little more than that; it's actually long-polling with JSON-P. This way, you can do cross-domain polling (which wouldn't work with standard XHR) while still getting the benefits of comet and long polling.

We've implemented such a structure in WebSync to allow our On-Demand version to work (we host the long-lived connection on our servers) in browsers like IE that don't support HTML5, etc.

jvenema