0
Building Powerful WebSocket, Comet, and RESTful Applications Using Atmosphere<br />http://twitter.com/atmo_framework<br />...
Creator of  the Grizzly Framework <br />Creatpr of GlassFish v3 Grizzly Micro Kernel<br />Creator and Co-Leader of  Atmosp...
News and Update<br />Comet and WebSocket Protocol<br />The Atmosphere Framework<br />Ya Ya Ya That’s Impossible<br />High-...
PrimeFaces (JSF) Spring IntegrationAkka (Scala/Actor) GWT-Comet Apache Tuscany Grails (Plug In)Atlassian (JIRA) Ning (Soci...
LongPolling<br />Web<br />Socket<br />Streaming<br />Browser<br />Server<br />Browser<br />Server<br />Browser<br />Server...
Atmosphere<br />Java WebServer<br />
WebSocket<br />Nothing<br />Comet<br />Java WebServer<br />Atmosphere<br />
Atmosphere<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Nothing<br />Comet<br />Java WebServer<br />
Atmosphere<br />Atmosphere Application<br />Atmosphere Runtime<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Not...
Atmosphere<br />Atmosphere Application<br />Atmosphere Runtime<br />Guice<br />WebSocket<br />Comet API<br />Servlet 3.0 A...
Atmosphere<br />Servlet<br />Atmosphere Application<br />Servlet runner<br />Atmosphere Runtime<br />Guice<br />WebSocket<...
Atmosphere<br />Atmosphere Annotations<br />Servlet<br />Atmosphere Application<br />Servlet runner<br />Atmosphere Runtim...
Atmosphere<br />Cluster<br />Atmosphere Annotations<br />Servlet<br />Atmosphere Application<br />Servlet runner<br />Atmo...
Atmosphere<br />Atmosphere Application<br />Cluster<br />Atmosphere Annotations<br />Jersey<br />Servlet<br />Atmosphere A...
Atmosphere<br />Atmosphere JQuery<br />Atmosphere Application<br />Cluster<br />Atmosphere Annotations<br />Jersey<br />Se...
Atmosphere<br />Atmosphere JQuery<br />Atmosphere Application<br />Cluster<br />Atmosphere Annotations<br />Jersey<br />Se...
Atmosphere<br />Atmosphere JQuery<br />Atmosphere Application<br />Atmosphere Application<br />Atmosphere Spade Server<br ...
Why<br />
Clustering<br />Why<br />
JMS<br />JGroups<br />Clustering<br />Why<br />
JMS<br />JGroups<br />Clustering<br />Guarantee Delivery<br />Why<br />
Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br...
Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br...
Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br...
Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br...
Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br...
Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br...
Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br...
Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br...
Same API everywhere. No need to learn the protocol!<br />
Comet<br />Web<br />Socket<br />IE<br />Chrome<br />JQuery Plugin<br />Auto detect best transport to use! Emulate WebSocke...
Ya Ya Ya<br />That’s impossible!<br />
@Path("/pubsub/{topic}")<br />@Produces("text/html;charset=ISO-8859-1")<br />public class JQueryPubSub {<br />    private ...
 function subscribe()<br />            {<br />                function callback(response)<br />                {<br />    ...
JAX-RS and Jersey with AtmosphereRESTful and asynchronous Web applications <br /><ul><li>JAX-RS is the Java API for RESTfu...
Jersey is the reference implementation and provides additional functionality
Atmosphere leverages the extensibility of Jersey
Atmosphere and Jersey can evolve at their own rates
Combine JAX-RS and Atmosphere annotations</li></li></ul><li>High-level Atmosphere conceptsLeveraging the power of REST, JA...
Upcoming SlideShare
Loading in...5
×

The Atmosphere Framework

15,127

Published on

Atmosphere talks @ Javaone 2010 on Websocket, Comet and JQuery

Published in: Technology
0 Comments
9 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
15,127
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
235
Comments
0
Likes
9
Embeds 0
No embeds

No notes for slide

Transcript of "The Atmosphere Framework"

  1. 1. Building Powerful WebSocket, Comet, and RESTful Applications Using Atmosphere<br />http://twitter.com/atmo_framework<br />Jeanfrancois Arcand<br />http://twitter.com/jfarcand<br />Paul Sandoz<br />http://twitter.com/PaulSandoz<br />
  2. 2. Creator of the Grizzly Framework <br />Creatpr of GlassFish v3 Grizzly Micro Kernel<br />Creator and Co-Leader of Atmosphere<br />Jeanfrancois<br />9 years @ Sun Microsystem<br />Creator Async Http Client<br />Co-leader of Atmosphere<br />Creator and Lead of Jersey<br />Paul<br />13 years @ Sun Microsystem<br />Java Champion<br />
  3. 3. News and Update<br />Comet and WebSocket Protocol<br />The Atmosphere Framework<br />Ya Ya Ya That’s Impossible<br />High-level RESTful and asynchronous applications<br />Twitter Search<br />Conclusion <br />Q & A<br />
  4. 4. PrimeFaces (JSF) Spring IntegrationAkka (Scala/Actor) GWT-Comet Apache Tuscany Grails (Plug In)Atlassian (JIRA) Ning (Social Network)AutoDesk (AutoCad) Fabric3 (3D) Thinked (Journie), Sonatype (Secret)<br />Wink Wicket Struts JQuery<br />Atmosphere 0.6.2<br />New! Atmosphere Gaming Framework<br />
  5. 5. LongPolling<br />Web<br />Socket<br />Streaming<br />Browser<br />Server<br />Browser<br />Server<br />Browser<br />Server<br />Request<br />Request<br />Request<br />Request<br />Response<br />Response<br />Response<br />Response<br />Response<br />Upgrade<br />Data<br />Data<br />
  6. 6. Atmosphere<br />Java WebServer<br />
  7. 7. WebSocket<br />Nothing<br />Comet<br />Java WebServer<br />Atmosphere<br />
  8. 8. Atmosphere<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Nothing<br />Comet<br />Java WebServer<br />
  9. 9. Atmosphere<br />Atmosphere Application<br />Atmosphere Runtime<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Nothing<br />Comet<br />Java WebServer<br />
  10. 10. Atmosphere<br />Atmosphere Application<br />Atmosphere Runtime<br />Guice<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Nothing<br />Comet<br />Java WebServer<br />
  11. 11. Atmosphere<br />Servlet<br />Atmosphere Application<br />Servlet runner<br />Atmosphere Runtime<br />Guice<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Nothing<br />Comet<br />Java WebServer<br />
  12. 12. Atmosphere<br />Atmosphere Annotations<br />Servlet<br />Atmosphere Application<br />Servlet runner<br />Atmosphere Runtime<br />Guice<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Nothing<br />Comet<br />Java WebServer<br />
  13. 13. Atmosphere<br />Cluster<br />Atmosphere Annotations<br />Servlet<br />Atmosphere Application<br />Servlet runner<br />Atmosphere Runtime<br />Guice<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Nothing<br />Comet<br />Java WebServer<br />
  14. 14. Atmosphere<br />Atmosphere Application<br />Cluster<br />Atmosphere Annotations<br />Jersey<br />Servlet<br />Atmosphere Application<br />Servlet runner<br />Atmosphere Runtime<br />Guice<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Nothing<br />Comet<br />Java WebServer<br />
  15. 15. Atmosphere<br />Atmosphere JQuery<br />Atmosphere Application<br />Cluster<br />Atmosphere Annotations<br />Jersey<br />Servlet<br />Atmosphere Application<br />Servlet runner<br />Atmosphere Runtime<br />Guice<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Nothing<br />Comet<br />Java WebServer<br />
  16. 16. Atmosphere<br />Atmosphere JQuery<br />Atmosphere Application<br />Cluster<br />Atmosphere Annotations<br />Jersey<br />Servlet<br />Atmosphere Application<br />Servlet runner<br />Atmosphere Runtime<br />Guice<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Nothing<br />Comet<br />Java WebServer<br />
  17. 17. Atmosphere<br />Atmosphere JQuery<br />Atmosphere Application<br />Atmosphere Application<br />Atmosphere Spade Server<br />Powered by Grizzly<br />Embed<br />Guice<br />WebSocket<br />Comet API<br />Servlet 3.0 API<br />Nothing<br />Comet<br />
  18. 18. Why<br />
  19. 19. Clustering<br />Why<br />
  20. 20. JMS<br />JGroups<br />Clustering<br />Why<br />
  21. 21. JMS<br />JGroups<br />Clustering<br />Guarantee Delivery<br />Why<br />
  22. 22. Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br />Why<br />
  23. 23. Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br />Why<br />Portable & Unified<br />
  24. 24. Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br />Why<br />Servlet 3.0<br />Blocking I/O<br />Portable & Unified<br />Comet Native<br />Web<br />Socket<br />New protocol<br />
  25. 25. Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br />Why<br />Servlet 3.0<br />Blocking I/O<br />Portable & Unified<br />Client<br />Comet Native<br />Web<br />Socket<br />New protocol<br />
  26. 26. Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br />Why<br />Servlet 3.0<br />Blocking I/O<br />GWT<br />JQuery<br />Portable & Unified<br />Client<br />Java EE<br />Comet Native<br />Web<br />Socket<br />Grails<br />JSF<br />New protocol<br />
  27. 27. Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br />Why<br />JRuby<br />Servlet 3.0<br />Blocking I/O<br />GWT<br />JQuery<br />Portable & Unified<br />Client<br />Java EE<br />Comet Native<br />Web<br />Socket<br />Grails<br />JSF<br />New protocol<br />
  28. 28. Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br />Why<br />JRuby<br />Groovy<br />Servlet 3.0<br />Blocking I/O<br />GWT<br />JQuery<br />Portable & Unified<br />Client<br />Java EE<br />Comet Native<br />Web<br />Socket<br />Grails<br />JSF<br />New protocol<br />
  29. 29. Cache<br />JMS<br />JGroups<br />OOM Manager<br />Clustering<br />Guarantee Delivery<br />Events Aggregation<br />Proxy<br />Why<br />JRuby<br />Scala<br />Groovy<br />Servlet 3.0<br />Blocking I/O<br />GWT<br />JQuery<br />Portable & Unified<br />Client<br />Java EE<br />Comet Native<br />Web<br />Socket<br />Grails<br />JSF<br />New protocol<br />
  30. 30. Same API everywhere. No need to learn the protocol!<br />
  31. 31. Comet<br />Web<br />Socket<br />IE<br />Chrome<br />JQuery Plugin<br />Auto detect best transport to use! Emulate WebSocket!<br />Comet<br />Web<br />Socket<br />Web<br />Socket<br />Server Side Events<br />Safari<br />Firefox<br />Opera<br />Comet<br />Comet<br />Comet<br />
  32. 32. Ya Ya Ya<br />That’s impossible!<br />
  33. 33. @Path("/pubsub/{topic}")<br />@Produces("text/html;charset=ISO-8859-1")<br />public class JQueryPubSub {<br /> private @PathParam("topic") Broadcaster topic;<br /> @GET<br /> public SuspendResponse<String> subscribe() {<br /> return new SuspendResponse.SuspendResponseBuilder<String>()<br /> .broadcaster(topic)<br /> .outputComments(true)<br /> .addListener(new EventsLogger())<br /> .build();<br /> }<br /> @POST<br />@Broadcast<br /> public Broadcastable publish(@FormParam("message") String message) {<br /> return new Broadcastable(message, "", topic);<br /> }<br />
  34. 34. function subscribe()<br /> {<br /> function callback(response)<br /> {<br /> if (response.transport != 'polling' && response.state != 'connected' <br /> && response.state != 'closed') {<br /> if (response.status == 200) {<br /> var data = response.responseBody<br /> if (data.length > 0) {<br /> $('ul').prepend($('<li></li>').text(" Message Received: " + data + " using transport: " + response.transport));<br /> }<br /> }<br /> }<br /> }<br /> $.atmosphere.subscribe(document.location.toString() + 'pubsub/' <br /> + getElementByIdValue('topic'),<br />callback : callback,<br /> $.atmosphere.request = {transport: getElementByIdValue('transport')});<br /> }<br />
  35. 35. JAX-RS and Jersey with AtmosphereRESTful and asynchronous Web applications <br /><ul><li>JAX-RS is the Java API for RESTful Web services
  36. 36. Jersey is the reference implementation and provides additional functionality
  37. 37. Atmosphere leverages the extensibility of Jersey
  38. 38. Atmosphere and Jersey can evolve at their own rates
  39. 39. Combine JAX-RS and Atmosphere annotations</li></li></ul><li>High-level Atmosphere conceptsLeveraging the power of REST, JAX-RS/Jersey <br /><ul><li>@Suspend or SuspendResponse API
  40. 40. Suspend a response
  41. 41. @Resume
  42. 42. Resume a response
  43. 43. @Broadcast or Broadcaster API
  44. 44. Broadcast events
  45. 45. @Schedule
  46. 46. Schedule execution of periodic broadcast
  47. 47. @Cluster
  48. 48. Cluster broadcasting</li></li></ul><li>We want a Twitter Real Time Search!<br />
  49. 49. Conclusion<br />Write Powerfull Asynchronous Web Application using Atmosphere<br />Write once, Run Anywhere<br />Transport free!<br />Browser nightmare free<br />Extremely Simple!<br />Join the community<br />http://github.com/Atmosphere/atmosphere<br />
  50. 50. THANKS YOU!<br />http://twitter.com/atmo_framework<br />Jeanfrancois Arcand<br />jfarcand@apache.org<br />Paul Sandoz<br />Paul.sandoz@oracle.com<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×