InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

The Atmosphere Comet Abstraction Framework Releases Alpha

Posted by Dionysios G. Synodinos on Mar 18, 2009

Sections
Development,
Architecture & Design
Topics
Performance & Scalability ,
Java ,
Rich Internet Apps
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.

Dionysios G. Synodinos is a Web Engineer and a freelance consultant, focusing on Web technologies

No comments

Watch Thread Reply

Educational Content

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?