RobertFischer/JQuery-PeriodicalUpdater - GitHub
december 2010 by kostas
"A port of Prototype's Ajax.PeriodicalUpdater function to jQuery. Basically, this function polls some remote service at fairly regular internvals, and (optionally) processes the result via a callback. The period of calls will decay as long as the same response keeps coming back from the server (either in the form of repeated data or in the form of a 304 Not Modified status), which reduces the load on the server naturally. The first Ajax call happens as a page 'onReady' handler $(function), so it is safe to put the PeriodicalUpdater call anywhere on the page."
jquery
comet
december 2010 by kostas
Comet works, and it’s easier than you think
may 2010 by kostas
The included instructions work for the Mac, apparently: http://markmail.org/message/qfj2ydzzrkeket7v
comet
jetty
howto
may 2010 by kostas
Bayeux | Infrequently Noted
may 2010 by kostas
"I think it’s going to be interesting to see how much the ability of platforms and languages to handle Comet workloads impairs or enhances their chances. Can Ruby and PHP pull off something that’ll allow them to scale? Will Twisted Python, Erlang, or full-stack Perl finally have their days in the webdev sun? Will great implementations in Java and C# hold the dynamic languages at bay?"
comet
may 2010 by kostas
Cometd, Bayeux, and Why They’re Different | Infrequently Noted
may 2010 by kostas
"So what, then is Cometd and how does it relate to this Bayeux specification? The short answer is that Cometd is a project to provide several reference implementations of Bayeux and to evolve the spec until it’s good enough for some other group to take over maintenance. Bayeux and Cometd are two complimentary parts of a plan to tackle the complexity around building and deploying comet apps, and we’re hoping for many independent Bayeux implementations outside of the Cometd project."
comet
may 2010 by kostas
The Bayeux Protocol
may 2010 by kostas
"Bayeux is a protocol for transporting asynchronous messages (primarily over HTTP), with low latency between a web server and web clients."
comet
may 2010 by kostas
Introduction to Bayeux Protocol (HTTP Publish-Subscribe) (SpiderLogic)
may 2010 by kostas
"Bayeux specification provides only a protocol definition. Cometd is a project by the Dojo Foundation to produce a specification (Bayeux) and a set of implementations of that specification (Cometd)."
comet
may 2010 by kostas
jquerycomet - Project Hosting on Google Code
may 2010 by kostas
"Cometd (bayeux) plugin for jQuery Supports AJAX long-polling and script callback-polling." More info from the author can be found here: http://morglog.org/?cat=13
comet
jquery
may 2010 by kostas
Comet Daily - Comet Maturity Guide
may 2010 by kostas
"We recently asked our contributors to outline the maturity of their preferred Comet server implementation. The summary of those questions are outlined here."
comet
reference
may 2010 by kostas
comet long polling with jquery - jQuery (English) | Google Groups
may 2010 by kostas
This should get you started:
(function($) {
$(document).ready(startComet);
function startComet() {
$.ajax({
url: 'myCometServer.php',
complete: onComplete
});
};
function onComplete(xhr, status) {
if (status == "success") {
var json = xhr.getResponseHeader('myCometHeader');
$.globalEval('('+json+')');
startComet();
}
else {
// handle errors
}
comet
jquery
(function($) {
$(document).ready(startComet);
function startComet() {
$.ajax({
url: 'myCometServer.php',
complete: onComplete
});
};
function onComplete(xhr, status) {
if (status == "success") {
var json = xhr.getResponseHeader('myCometHeader');
$.globalEval('('+json+')');
startComet();
}
else {
// handle errors
}
may 2010 by kostas
jQuery: AJAX Queue/Cache/Abort/Block Manager
may 2010 by kostas
"Helps you to manage AJAX requests and responses (i.e. abort requests, block requests, order requests)."
jquery
comet
may 2010 by kostas
StreamHub - The Reverse Ajax / Comet Server
may 2010 by kostas
"HTML, Ajax, GWT, .NET, iPhone and Java clients can all receive data from StreamHub. Data can be streamed into StreamHub using the Java or .NET SDKs. StreamHub's highly-scalable architecture is used for streaming live stock quotes, spread betting, real-time monitoring, instant messaging/chat, live news/sports delivery, online gaming and a whole host of Rich Internet Applications."
A tutorial for a Java-based chat client on Streamhub can be found here: http://streamhub.blogspot.com/2009/07/tutorial-building-comet-chat.html
comet
A tutorial for a Java-based chat client on Streamhub can be found here: http://streamhub.blogspot.com/2009/07/tutorial-building-comet-chat.html
may 2010 by kostas
jQuery: Making simultaneous ajax requests, is it possible? - Stack Overflow
may 2010 by kostas
"The browser limits you to two requests at any given time. This is part of the HTTP specification."
comet
jquery
may 2010 by kostas
RobertFischer's JQuery-PeriodicalUpdater at master - GitHub
may 2010 by kostas
"A port of Prototype's Ajax.PeriodicalUpdater function to jQuery. Basically, this function polls some remote service at fairly regular internvals, and (optionally) processes the result via a callback. The period of calls will decay as long as the same response keeps coming back from the server (either in the form of repeated data or in the form of a 304 Not Modified status), which reduces the load on the server naturally. The first Ajax call happens as a page 'onReady' handler $(function), so it is safe to put the PeriodicalUpdater call anywhere on the page."
More info here: http://enfranchisedmind.com/blog/posts/jquery-periodicalupdater-ajax-polling/
comet
jquery
More info here: http://enfranchisedmind.com/blog/posts/jquery-periodicalupdater-ajax-polling/
may 2010 by kostas
Simple comet example using php and jquery - Stack Overflow
may 2010 by kostas
function listen() {
$.get("/mylongrequestfile", {}, function(data) {
$("#mydiv").html(data);
listen(); // then launch again
}));
};
comet
jquery
$.get("/mylongrequestfile", {}, function(data) {
$("#mydiv").html(data);
listen(); // then launch again
}));
};
may 2010 by kostas
How to implement COMET with PHP
may 2010 by kostas
I went with the second guide; "I will now explain how to implement Comet with PHP programming language. I will demonstrate it on two demos which uses two techniques: the first one is based on hidden ”<iframe>” and the second one is based on classic AJAX non-returning request."
comet
php
may 2010 by kostas
Comet (programming) - Wikipedia, the free encyclopedia
may 2010 by kostas
"In web development, Comet is a neologism to describe a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it. Comet is an umbrella term for multiple techniques for achieving this interaction. All these methods rely on features included by default in browsers, such as JavaScript, rather than on non-default plugins."
comet
may 2010 by kostas
Comet Programming: Using Ajax to Simulate Server Push
may 2010 by kostas
"Comet streaming techniques are considered to be somewhat inferior to long polling for several reasons. The Hidden IFrame technique has two major flaws: the lack of a reliable way to handle errors and the impossibility of tracking the state of the request calling process. The XMLHttpRequest Server Push technique, is even more limited in applicability, as it only works with Gecko-based browsers. Long polling, on the other hand, is easier to implement on the browser side, and works in every browser that supports JavaScript and Ajax."
comet
may 2010 by kostas
Real-time “AJAX” JavaScript Progress Bar | Perplexed Labs
may 2010 by kostas
Using the iframe method.
comet
may 2010 by kostas
PHP jQuery AJAX Javascript Long Polling | Perplexed Labs
may 2010 by kostas
"We don't actually loop infinitely server side. You may have noticed the logic for the while loop - if we've executed for more than 30 seconds we discontinue the loop and return nothing. This nearly eliminates the possibility of substantial memory leaks. Also, if we didn't put a cap on execution time we would need to print a "space" character and flush output buffers every iteration of the loop to keep PHP abreast to the status of this process/connection. Without output being sent PHP cannot determine if the connection was lost via connection_status() or connection_aborted(). As a result this could lead to a situation where there are an increasing number of "ghost" processes eating up server resources. Not good!"
comet
php
may 2010 by kostas
John Resig - Streaming HTTP / Server Push
may 2010 by kostas
"Sounds simple enough, but the hassles are just beginning."
comet
may 2010 by kostas