Your SlideShare is downloading. ×
0
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
Socket.io
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

Socket.io

2,191

Published on

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

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

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

No Downloads
Views
Total Views
2,191
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
30
Comments
0
Likes
2
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. @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

×