Your SlideShare is downloading. ×
The Atmosphere Framework
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

The Atmosphere Framework

14,909
views

Published on

Atmosphere talks @ Javaone 2010 on Websocket, Comet and JQuery

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
14,909
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
231
Comments
0
Likes
9
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

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