Socket.io
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Socket.io

on

  • 2,870 views

socket, socket.io, node.js, nodejs, js

socket, socket.io, node.js, nodejs, js

Statistics

Views

Total Views
2,870
Views on SlideShare
2,860
Embed Views
10

Actions

Likes
1
Downloads
27
Comments
0

3 Embeds 10

http://paper.li 8
http://nodeslide.herokuapp.com 1
http://www.verious.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Socket.io Presentation Transcript

  • 1. @diego_pachecoSoftware Architect | Agile Coach
  • 2. HotSpot(20x faster)Lars Bak JIT Threads Assembler
  • 3. non-blocking i/o VS blocking i/o
  • 4. Http,Tcp,File BindingsEvented I/OGood Speed(Performance)Good for concurrencyEverything AsynchronousJS Server SideRuns on Google V8Supports for Redis & MongoDBReal time apps with WebSockets(html 5)Rubys Event Machine or Pythons Twisted
  • 5. Why Socket.io? Why Not WebSockets?
  • 6. Features Transparent Transport API Authorization Timeouts Heartbeats / Disconnection Cross Browser + Mobile/Tablets Reconnection + Buffering Multiple Sockets with same connection Modules (session, logger, node2node, mq)
  • 7. Multi-Transport Socket for
  • 8. Select the best transport option: WebSocket Adobe® Flash® Socket AJAX long polling AJAX multipart streaming Forever Iframe JSONP Polling
  • 9. [server.js]
  • 10. [index.html]
  • 11. $ node server.js info - socket.io started debug - client authorized info - handshake authorized 10976962382111866647 debug - setting request GET /socket.io/1/websocket/10976962382111866647 debug - set heartbeat interval for client 10976962382111866647 debug - client authorized for debug - websocket writing 1:: debug - websocket writing 5:::{"name":"news","args":[{"hello":"world"}]}{ my: data }
  • 12. [calc.html]
  • 13. $ node calc.js info - socket.io started debug - client authorized info - handshake authorized 19733746072008321086 debug - setting request GET /socket.io/1/websocket/19733746072008321086 debug - set heartbeat interval for client 19733746072008321086 debug - client authorized for debug - websocket writing 1::doop event received.{ va: 10, vb: 21, op: + } debug - websocket writing 5:::{"name":"result","args":[{"result":31}]}
  • 14. Thank You!@diego_pachecoSoftware Architect | Agile Coach