InfoQ

News

The Atmosphere Comet Abstraction Framework Releases Alpha

Posted by Dionysios G. Synodinos on Mar 18, 2009

Community
Java
Topics
Rich Internet Apps ,
Performance & Scalability
Tags
Comet

Atmosphere which started off as an evolution of Grizzly, is a POJO based framework that aims to bring Comet to the masses. This Comet Abstraction Framework released its first alpha version and InfoQ had a Q&A with its creator Jean-Francois Arcand about it.

Since the Atmosphere framework is portable it can run on any Java based Web Server, including Tomcat,Jetty, GlassFish,Resin, Jersey,RESTlet etc. without having to wait for the Servlet 3.0 implementations and without the developer needing to utilize any container-specific  push/Comet mechanism.

Jean-Francois explains the motivation behind Atmosphere:

Currently, writing a portable Comet application is impossible: JBossWeb has AIO, Tomcat has its a different AIO API, Jetty has its Continuation API and pre Servlet 3.0 API support, Grizzly has its Comet Framework and Grizzlet API, etc. So, framework like DWR, ICEFaces and Bindows all added native support and abstracted a layer in order to support different Comet API. Worse, if your application uses those API directly, then you are stuck with one Web Server. Not bad if you are using Grizzly Comet, but if you are using the competitor, then you cannot meet the Grizzly!

The current Servlet EG are working on a proposal to add support for Comet in the upcoming Servlet 3.0 specification, but before the planet fully supports the spec it may takes ages. And the proposal will contains a small subset of the current set of features some containers already supports like asynchronous I/O (Tomcat, Grizzly), container-managed thread pool for concurrently handling the push operations, filters for push operations. etc. Not to say that using Atmosphere, framework will not longer have to care about native implementation, but instead build on top of Atmosphere. Protocol like Bayeux will comes for free, and will run on all WebServer by under the hood using their native API.

So I'm launching Atmosphere, hoping to close the gap and simplify the creation of Comet based application based on the experience/feedback I got since two year with the Grizzly Comet Framework.

The official announcement outlines the requirements for an application to utilize Atmosphere:

To bundle Atmosphere inside your web application, download atmosphere-cpr jar file from here: http://download.java.net/maven/2/org/atmosphere/atmosphere-portable-runtime/ and put it under WEB-INF/lib

Download the context.xml file (required for Tomcat support): http://is.gd/ngMm and put it under META-INF/ or your war file

Optionally, you can define you AtmosphereHandler by creating an atmosphere.xml like: http://is.gd/ngM1 under META-INF of you war file

This is optional, as the framework can autodetect your AtmosphereHandler and  map it using it class's name (see the chat demo for more info).

InfoQ discussed with Jean-Francois about the release of Atmosphere:

InfoQ: Jean-Francois, would you like to describe to us the various components that make up atmosphere?

Right now we are planning to have 3 modules. The first one (released last week) is a the CPR (Comet Portable Runtime) which brings portability to web application who want t use Comet . The second one, called core, will bring the CPR inside Project Jersey and will allow the use of REST, annotation, IoC etc. That will make building Comet application quite easy. The last one, called PlugIn, will allow developer to extend the core (using annotation) . An example can consist of adding clustering capability to your web application. e.g when a connection is suspended on instance 1, it will gets notified when a push happens if annotated. So you will be able to cluster comet application and gets them updated all at the same time.

InfoQ: What is the roadmap and when are the upcoming releases planned for?

By the end of April we should have core and cpr module available. The PlugIn will be an ongoing effort.

InfoQ: How do you see Atmosphere evolving side-bys-de with the Servlet 3.0 spec?

Atmosphere will support Servlet 3.0 async API, but Atmosphere offer more than what 3.0 propose. As an example, the Atmosphere’s Broadcaster is very useful when it is time to push/aggregate/filter data between suspended connections.

You can find more information about Atmosphere on the project’s page, Twitter, mailing lists and Jean-Francois blog.

No comments

Watch Thread Reply

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.