UniversalComet via the Google App Engine

by Dylan SchiemannDecember 31st, 2008

Malte Ubl has created UniversalComet, a proof of concept Comet implementation (cross-domain JSON-P polling) using the Google App Engine. Note that it is currently just traditional polling because of current limitations with Google App Engine’s approaches to long-lived connections.

First, the Hello World of Comet, the obligatory Chat demo:

The API to include this Comet implementation in your app is simple:

<script type="text/javascript" 
    src="http://universal-comet.appspot.com/static/client-server-mini.js">
</script>
<script type="text/javascript">
var server = new Addressable.Server();
 
server.onmessage = function (message) {
alert(message)
}
 
server.connect(function (id, url) {
// send url to you server using AJAX
})
</script>

Google Gears is optionally used to provide an additional HTTP connection, and Google App Engine effectively acts as a reverse proxy for handling Comet requests in an off-board manner.

If it doesn’t already do so, it seems likely that blok will use UniversalComet:

UniversalComet is part of Joose, a Meta Object System for JavaScript (e.g. traits, advice). Dojo provides many similar features. By contrast, Joose is focused on just this feature set, and works with many toolkits including Dojo and jQuery.

The App Engine server-side code relies on their approach to using App Engine to create apps with JavaScript.

UniversalComet and Joose are available under the new BSD license.

4 Responses to “UniversalComet via the Google App Engine”

  1. Chris Says:

    Traditional polling is the exact opposite of Comet. The whole point behind Comet is that you don’t poll. At all. UniversalComet is not Comet!!! Please stop circulating his post.

  2. Jose Maria Arranz Says:

    Comet is a term with a not definitively fixed definition.

    For me Comet = Real Time Web

    http://cometdaily.com/2008/10/25/comet-real-time-web/

  3. Matt Says:

    If you’re looking for a quick introduction to the Google App Engine check out http://www.squidoo.com/Google-App-Engine

  4. delacru Says:

    Hi friend,
    Many people are enthu about its functionality even if they haven’t used it
    You can read this article :=
    http://bygsoft.wordpress.com/2010/01/09/cloudy-combo-google-app-engine-and-amazon-s3-combo-pack/


Copyright 2015 Comet Daily, LLC. All Rights Reserved