Atmosphere 1.0, the Asynchronous JavaScript/Java Framework now available!
Today, after almost 4 years of in and out works(*), I’m really happy to announce the immediate availability of the Atmosphere Framework version 1.0, the only Asynchronous JavaScript/Java Portable framework running on the JVM!
The Atmosphere Framework ships with multiple components, and can be used with JRuby, Scala, Groovy and Java:
- Atmosphere Javascript: The client side of Atmosphere, supporting by all browsers. Supports Websockets and HTML 5 Server Sides Events when available, transparently fallback to Http Streaming/Long Polling or JSONP when not supported. Available for JQuery and Ext JS. Supports sharing/multiplexing a single connection amongst browser’s windows/tabs.
- Atmosphere Runtime: The server side of Atmosphere, supporting all major WebServers. Supports WebSockets and HTML 5 Server Sides Events when available, fallback to WebServer’s Native Comet Implementation or the ugly Servlet 3 Async API at last. Also works transparently on top of the Netty and Grizzly Framework (no Servlet Container required). It also transparently brings WebSockets support to any exiting Servlet, without any changes required!
- Atmosphere Jersey: A native extension to the Jersey Framework (REST). Transparently brings WebSockets and HTML5 Server Side Events to your REST architecture, using the JAX RS API. Also support the strange JAX RS 2 Async API.
- Atmosphere GWT: A native extension to the GWT Framework. Transparently brings WebSockets and HTML5 Server Side Events.
- Atmosphere Socket.IO: A native extension to the Socket.IO protocol. Free you from node.js, brings you the JVM scalabilty for free. WebSockets included.
- Atmosphere Cometd: Run the Cometd Framework on top of Atmosphere, get portable WebSockets and the cloud API for free.
- Atmosphere Cloud API: Many module are available to make your application working into the cloud. Native Support for Redis PubSub, Hazelcast, JGroups, XMPP (GMail), JMS
Atmosphere is natively supported and available in PrimeFaces, Apache Wicket, Vaadin, Grails, RichFaces, Scalatra, Apache Tuscany, JQuery-Socket etc. and works fine with Spring and Google Guice.
Atmosphere works fine with Firefox 3+, Internet Explorer 6+, Opera 10+, Chrome 2+, Safari 2+, IOS 2+ and Android 2+ and supports connections sharing across multiple tabs and windows as. Open one connection, share it on all pages!
Atmosphere works with every Java EE Application Server and can automatically negotiates the best transport between the client and server. Atmosphere’s support portable WebSockets with Jetty, GlassFish, Grizzly 2, Tomcat and Netty. Write once, deploy anywhere!
Atmosphere ships with many samples, so get started very fast.
In short, Atmosphere works everywhere and with every framework. Websockets, Server Sides Events or any HTTP techniques are supported transparently. Write one javascript, one server file and Atmosphere will make it work every where, without any changes! As simple as (Client)
var request = { url: document.location.toString() + 'chat', contentType : "application/json", transport : 'websocket' , fallbackTransport: 'long-polling'}; request.onOpen = function(response) { // Display the user logged }; request.onMessage = function (response) { var message = response.responseBody; var json = jQuery.parseJSON(message); addMessage(json); };
(Server)
@AtmosphereHandlerService(path = "/chat", interceptors= {AtmosphereResourceLifecycleInterceptor.class}) public class Chat implements AtmosphereHandler { @Override public void onRequest(AtmosphereResource r) throws IOException { r.getBroadcaster().broadcast(r.getRequest().getReader().readLine()); } @Override public void onStateChange(AtmosphereResourceEvent event) throws IOException { AtmosphereResponse res = r.getResponse(); if (event.isSuspended()) { String body = event.getMessage().toString(); res.getWriter().write(new Data(body).toString()); } } }
You can see the Wordnik’s Atmosphere implementation lives, servicing approximatively between 40 to 50 millions of requests per day on WSJ.com (depending on enabled pages), or with any website using our Related Content PlugIn.
Atmosphere gets more than 25 000 downloads per month and widely used in production. Follow us on Github or Twitter. The more we are the better it will be!
(*) I would like to gigantically thanks Tony Tam and Erin McKean (and the team @Wordnik) for allowing me to work a significant amount of my time on Atmosphere every day, since last year!!.


Congratulations ,nice work
Congratulations I’m just getting started w/Atmosphere and it’s looking pretty great! Good timing on my part. Thank you for all your hard work.
Congrats JF! It’s a huge milestone! Keep the good stuff coming!
Hurray, hurray. Congratulations!
To celebrate the day I’ve also set up a project with the Atmosphere Framework:
https://github.com/bennyn/atmosphere-framework-sample
Greetings from Germany
Benny
Hi, congratulations !
I’d like to ask, is atmosphere support load balancing? can i run multiple servers behind HAPrxy or amazon ELB and every thing works ok?
does this works for every transport or there are unsupported ones?
what about socket.io protocol… is load balancing is supported in this case?
Thanks
Joe
Yes, it works fine with HAProxy and Amazon ELB (we are running WSJ.com using ELB. Works fine with WebSockets, Long-Polling and JSONP (that’s what we are using for WSJ.com)
JF, once again you amaze me with your enginuity. I’ve started using it.
thanks
Congratulations Jean-Francois
Impressive stack that you came up with!
Congrats! I still remember that first conversion on the steps of conference hall at Devoxx
Thanks Paul!!! I also remember being at your house trying to think about how we can make Jersey async
Great work; I’m proud to be a long time Atmosphere user/contributor!
Really happy to see such a framework reaching a milestone.. Congrats and thank you for building Atmosphere
Thanks!! for the helpful post.
Great job !
I’m trying to implement a Comet based app for a customer: some server notifications are pushed to the client’s browser.
The production server is JBoss EAP 5.1.0.
I’ve checked the JBoss web jars and I’ve noticed that it comes with an old version of atmosphere (0.9 I think).
Could you tell me please what’s the best approach to achieve this requirement?
Is this an example that works on JBoss 5.1.0 or so?
Thanks in advance!
Thanks. Just use Maven or download version 1.0.0 from here http://search.maven.org/#search%7Cga%7C1%7Catmosphere.
JF,
I’ve tested the chat example with JBoss 5.1.0 (community edition) and I’ve got the following errors:
1. Error with web.xml web-app element declaration
The right declaration is:
2. Error with async-supported in web.xml
I simply removed it from web.xml
3. java.lang.ClassNotFoundException: org.jboss.web.jsf.integration.config.JBossJSFConfigureListener…
I don’t know what’s missing here.
According to servers compatibility (https://github.com/Atmosphere/atmosphere/wiki/Supported-WebServers-and-Browsers), atmosphere is compatible with JBoss 5.1.x
Do you I need to add/change anything to make the chat example work on JBoss 5.1.0 please?
Thanks!
web-app element should be:
web-app version=”2.5″ xmlns=”http://java.sun.com/xml/ns/javaee”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd“
I found the solution to the error#3 here http://blogs.adobe.com/dmcmahon/tag/classnotfoundexception/
Now, I have this error: Error configuring application listener of class org.jboss.web.tomcat.security.SecurityFlushSessionListener…
I struggled to get everything working in Windows 7 (64).
Now my IE 8, Firefox 15.0.1 and Google Chrome 21.xxx are chatting like a charm….
I’ll see how to share what I have done sooner.
Thanks for this big framework!!!
http://javayk.wordpress.com/2012/09/10/atmosphere-1-0-chat-example-jboss-5-1-0/
Great job !!
Hi JF, which part of wsj or Smartmoney is using Atmosphere?
I’m trying to push the case of using websockets with Atmosphere in my company, and it would be great if I were able to show them a little bit behind the scenes with Chrome and the developer tools.
@asarco: For example, this page. All pages that display the Wordnik logo. Thansk!
Thanks JF, but I had to look it up in the page source code to find it, since seems to be disabled at the moment. The div is hidden, and parts of the script are commented out, so it’s not functional at the moment.
@asarco: Strange I do see it with the WebSocket connection enabled as well.
Is this the best forum for asking questions on how to use Atmosphere, etc? If not, is there a group or other forum? Thanks!
Salut, here!
i really like that you are giving information on core and advance java concepts. Being enrolled at http://www.wiziq.com/course/1779-core-and-advance-java-concepts i found your information very helpful indeed.thanks for it.
Reblogged this on Java Holic.
Bonjour,
Il semble que vous être français (ou en tout cas francophone) alors je vais m’exprimer dans notre belle langue : j’essaye d’intégrer le framework Atmosphere v1.0.2 dans une application Rest/GWT. Pour l’instant j’ai simplement ajouté les dépendances dans le pom.xml, ajouté la servlet Atmosphere dans le web.xml et ajouté une annotation @Broadcast sur un de mes services Rest.
Lorsque je tente d’interroger ce service, j’ai une erreur : “The Atmosphere Framework is not installed properly and unexpected result may occurs”. L’erreur survient dans AtmosphereFilter.class, au moment de charger la configuration (ATMOSPHERE_CONFIG).
Je m’arrache les cheveux car je ne vois pas du tout comment résoudre ce problème, j’ai essayé plusieurs choses mais sans succès.
Si vous avez une idée du problème, je serai ravi de disposer de votre aide !
Merci d’avance,
Dany
PS : s’il existe un meilleur endroit pour échanger je suis preneur aussi
Hi,
I browsed “the Wall Street Journal” site, WSJ.com, and I frankly didn’t understand where exactly “atmosphere” is used… sounds strange mentioned “related content plugin”… thanks
Hi,
I’ve a web page that is more like a dashboard (a collection of widgets) that sends multiple ajax requests to server. The issue is I cant combine the requests, since they are logically different with unique apis.
But still I must reduce the latency by making 1 request with multiple responses or use some Reverse-Ajax techniques that can speed up my page.
Now I came across Atmosphere – I’m confused which API suits me – Is it Websockets or SwaggerSockets or anything else. Please let me know which technique I should choose and reference sample would be great!
Does Atmosphere 1.0.6 works with ZKOSS ? Can you provide the steps to integrate it.
Thank you.
awesome work.. thanks..