SitePen Support
Lightstreamer

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.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Which Java Framework for Comet and Dojo?

by Dylan SchiemannDecember 23rd, 2008

Matt Raible recently posted the results of this research on Dojo support in Java frameworks:

This week I’m doing a research project for a client. The main purpose of the project is to find out which Java-based web framework works best with Dojo and Comet.

His conclusions and the comments posted are interesting. Here’s my take on his notes, user comments, and what I know:

  • Tapestry 5 only has Prototype and Scriptaculous (which is actually the opposite of earlier versions of Tapestry… Tapestry 5.1 is supposed to support your choice of Prototaculous, Dojo, or jQuery
  • Struts 2 has old (version 0.4.3) and somewhat deprecated Dojo support. Struts 2 doesn’t have support for Comet. Note: SitePen has helped several clients using Struts move to Dojo 1.2.
  • Wicket has support for Dojo 1.1 that includes Comet support, but it is not yet documented
  • DWR is likely the most popular approach, especially with DWR 3.0’s Dojo Data Store
  • Persevere could be another option. If the client used a framework that was focused on REST or RPC, it could be a great approach to bridge the gap between server framework and the Dojo Toolkit.

If your Java web framework has support for Comet and Dojo, please let us know here and on Matt’s original Dojo support in Java frameworks article.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

DWR, Dojo, Confetto at Devoxx

by Dylan SchiemannDecember 7th, 2008

Joe Walker and Nikolai Onken are speaking at Devoxx this week on the topic of Creating amazing user interfaces with Dojo and DWR.

Also, when reading about the talk, I noticed Confetto, the Orbited-based conference chat system discussed last month by Michael Carter, in the bottom right corner:

If you’re attending Devoxx, please let us know your feedback on using Confetto and the talk given by Joe and Nikolai.

Update: It’s worth mentioning that Confetto is half cometD (Jetty), half Orbited, and uses Dojo for its user interface and Comet communication. Kevin Nilson worked with Michael Carter to create Confetto.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Dojo and WebSocket

by Dylan SchiemannOctober 29th, 2008

The HTML5 defined WebSocket has been gaining in popularity because of its efficient and intuitive approach to Comet. Orbited has done a great job preparing for the day when native implementations exist by providing the same WebSocket API that will eventually be provided by major web browsers.

While the support for WebSocket used to be tied to the Orbited Comet server, it has been recently decoupled from the server. The JavaScript layer of support was recently moved to js.io for maximum interoperability. Mario Balibrera just checked-in code for wrapping js.io with the Dojo-based package system, making it very easy for Dojo apps to now access the js.io APIs, and WebSocket in particular! In addition to support for dynamically including js.io namespaces, it is also of course very easy to roll your own Dojo build with WebSocket support! We’ll follow-up with a tutorial next week.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Comet in the Aptana Cloud

by Dylan SchiemannOctober 22nd, 2008

Aptana has announced the launch of Aptana Cloud 1.0 and Aptana Studio 1.2.

Through a hybrid-Ajax app (part web, part desktop) embedded in Aptana Studio/Eclipse, the Cloud Management application connects you to local projects and resources as well as production hosting, staging, source control, team development, and other useful online services in the Aptana Cloud using Comet channels.

To see this in action, you can either view the screencast, or download Aptana Studio 1.2 which includes this application.

The Cloud Management application utilizes the following technologies:

  • The built-in Mozilla browser engine that’s in Eclipse to execute Aptana Cloud’s Ajax GUI
  • Comet communications (via the Jetty server in Aptana Studio) for real-time events and messages
  • Ajax-invoked Eclipse and Aptana Studio APIs that get project and file data, integrate with synchronization processes, kick off and facilitate various workflows, like instantly deploying or scaling your applications

Update: Thanks to Aptana, if you enter the coupon code TRYCLOUDNOW when you deploy a project or just kick the tires of one of the samples provided, you can explore the Cloud for up to a week at no cost (and the rates are only 4 cents per hour after that).

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

WebLogic and Bayeux

by Dylan SchiemannOctober 20th, 2008

James Bayer has started a series of posts about Bayeux and WebLogic.

WebLogic Server 10gR3 now includes an enterprise class HTTP Publish and Subscribe Server that implements the Bayeux protocol. This protocol provides the ability to apply the Ajax concept known as Comet. This means that simple web clients based only on html and javascript can be notified nearly instantly as events are observed by the server; no Applets, Flash, or Silverlight required.

A sample application I created with Dojo 1.1.1 worked fine in both IE and Firefox. I’ll plan on writing about in a follow-up entry as there is enough to say to make this a series of posts. Dojo and WebLogic together provide a very compelling solution.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

A Million User Comet App with MochiWeb

by Dylan SchiemannOctober 17th, 2008

Richard Jones has started an article series about building A Million-user Comet Application with MochiWeb.

In this series I will detail what I found out empirically about how mochiweb performs with lots of open connections, and show how to build a comet application using mochiweb, where each mochiweb connection is registered with a router which dispatches messages to various users. We end up with a working application that can cope with a million concurrent connections, and crucially, knowing how much RAM we need to make it work.

In part one:

* Build a basic comet mochiweb app that sends clients a message every 10 seconds.
* Tune the Linux kernel to handle lots of TCP connections
* Build a flood-testing tool to open lots of connections (ye olde C10k test)
* Examine how much memory this requires per connection.

Future posts in this series will cover how to build a real message routing system, additional tricks to reduce memory usage, and more testing with 100k and 1m concurrent connections.

Erlang and MochiWeb continue to gain popularity in the Comet space. Other recent Comet Erlang stories include Roberto Saccon’s Getting Started with Comet on Erlang, and Facebook’s use of ejabberd.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

ZK 3.5 Adds Comet Support

by Dylan SchiemannSeptember 18th, 2008

ZK, a framework popular for Mobile Ajax, has added Comet support to their latest release.

ZK has supported server push since ZK 3.0, and ZK 3.5 now supports Comet-based server push. Developers simply use Comet in the way they are used to for normal Ajax development. The implementation of server push is transparent to developers. ZK chooses which implementation to use according to the edition of ZK automatically, but it is configurable.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

UA Profiler

by Dylan SchiemannSeptember 12th, 2008

Steve Souders has created UA Profiler, a community-drive project for gathering browser performance characteristics. Of particular note to Comet developers is information about the maximum number of connections, and the ability of popular browsers to execute scripts in parallel.

To help them out, go run the test for your browser. Also, let us know what other performance metrics would be interesting for Comet developers, and we’ll nudge them to add those to their tests.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Oracle, BEA, and Bayeux

by Dylan SchiemannAugust 26th, 2008

Oracle has announced a new version of WebLogic with Bayeux support.

Developers from BEA contributed efforts towards defining the Bayeux protocol, and it’s great to see them ship this update to WebLogic. They also have a tutorial available, Using the HTTP Publish-Subscribe Server, providing detailed information for WebLogic users.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Copyright 2009 Comet Daily, LLC. All Rights Reserved