More Related Content Similar to CodeCamp Iasi 10 march 2012 - websockets-with-atmosphere Similar to CodeCamp Iasi 10 march 2012 - websockets-with-atmosphere (20) More from Codecamp Romania More from Codecamp Romania (20) CodeCamp Iasi 10 march 2012 - websockets-with-atmosphere2. WebSockets with
Atmosphere
Dan Vulpe
@dvulpe
10 mar 2012
Friday, March 9, 12
3. HTTP - Half Duplex
Request
Client Server
Friday, March 9, 12
4. HTTP - Half Duplex
Request
30-150ms
Response
Request
Connection 2
Response
Client Server
Friday, March 9, 12
5. HTTP - Half Duplex
Request
30-150ms
Response
HttpSession
Request
Connection 2
Response
Client Server
Friday, March 9, 12
7. WebSocket Full Duplex
Handshake Request
WebSocket upgrade
Single TCP connection
Client Server
Friday, March 9, 12
8. Atmosphere
• Java Framework provides uniform Comet
API
• Supports: WebLogic, Tomcat, Jetty, Glassfish,
JBoss, Grizzly, Servlet 3.0 Async
• Fallback to blocking-IO (one thread per
channel)
• jQuery plugin
• WebSocket façade
Friday, March 9, 12
9. Components
MeteorServlet Http Request
AtmosphereResource Broadcaster
Friday, March 9, 12
10. Server: Incoming
• Implement
SubProtocol
• handle onMessage
events
Friday, March 9, 12
11. Server: Outgoing
• Request a Broadcaster from Factory
• Subscribe resources to Broadcaster
• Publish messages through Broadcaster
Friday, March 9, 12
14. Java Support
• Server side
• JSR356 - Java API for WebSocket - In Progress
• Containers: Jetty(7, 8), Grizzly/Glassfish, Resin
• Client
• async-http-client
Friday, March 9, 12
15. Resources
• https://github.com/Atmosphere/atmosphere
• http://www.websocket.org/
• http://www.w3.org/TR/websockets/
• http://wiki.eclipse.org/Jetty/Feature/WebSockets
Friday, March 9, 12
16. Thank you!
Please fill out the evaluation form!
Friday, March 9, 12