On-board vs. Off-board Comet

by Joe WalkerMay 22nd, 2008


Off-board Comet: When separate web-servers handle normal connections and Comet connections.

On-board Comet: When the web-server that serves your normal content also handles your Comet connections.

What difference does it make?

More than you might think. While there are some fuzzy parts to these differences, it affects your architecture.

Off-board Comet

  • Favors a more disconnected bus-like architecture
  • Works well with a multi-language system
  • Libraries can offer scaling more easily

off-board Comet diagram

On-board Comet

  • Easier to get started
  • Easier management of state shared with normal content
  • Development platform can be more unified

on-board Comet diagram

What libraries help me do on-board and off-board?

Cometd, Lightstreamer, Caplin Liberator and Orbited are examples of off-board systems. DWR and web-servers with built-in Comet like Jetty, Grizzy and Tomcat are examples of on-board systems, although web-server based options could be used in an off-board way too.

For our Comet talk at JavaOne we had a Twitter clone implemented with DWR. We were able to add Comet updates in 2 lines of configuration and under 50 lines of source code. To have done the same using Cometd would have taken much more effort. On the other hand if, like Facebook, we’d wanted to use Erlang to overcome threading problems, DWR would have been a non-starter.

How do I choose?

Some indicators that you need off-board Comet:

  • You are looking for Facebook or Google levels of scalability.
  • You are using PHP or another language that doesn’t play particularly well with Comet.
  • You have a large existing system, and your use-case for Comet is fairly separate from your main business.

Some indicators that you might need on-board Comet:

  • Your Comet needs are tightly integrated with your main business.
  • You are looking to get started with some simple use-cases.
  • You want Comet features without significant server changes.

If you would like some help or advice with Comet then it’s worth asking SitePen as we provide professional Comet support from investigating an architecture, to developing a solution.

The JavaOne talk

I’ve uploaded the slides that Alex Russell and I used at JavaOne to SlideShare.

You don’t get to see the demo on these slides, but if you want you can try it out yourself. BlabberOne is a Twitter clone which demonstrates (amongst other things) how easy it can be with on-board Comet to add asynchronous updates. The source code is available from DWR’s SVN repository.

4 Responses to “On-board vs. Off-board Comet”

  1. sean Says:

    the off-board choice seems to be better

  2. Martin Tyler Says:

    Off-board Comet solutions decouple the scalability needed between the realtime data and the ‘web’ data - which can be an advantage too. Eg 2 web/app servers and 4 comet servers if you had high data rates.

  3. Martyn Davies » Blog Archive » links for 2008-05-28 Says:

    [...] On-board vs. Off-board Comet More Comet research. It’s on the list as the next technology to learn about after the next few weeks of Django. This along with XMPP (tags: comet java pubsub server programming ajax) [...]

  4. Comet Daily » Blog Archive » UniversalComet via the Google App Engine Says:

    [...] and Google App Engine effectively acts as a reverse proxy for handling Comet requests in an off-board [...]

Copyright 2015 Comet Daily, LLC. All Rights Reserved