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

Socket.io

on

  • 2,814 views

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

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

Statistics

Views

Total Views
2,814
Views on SlideShare
2,804
Embed Views
10

Actions

Likes
1
Downloads
26
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 Socket.io Presentation Transcript

  • @diego_pachecoSoftware Architect | Agile Coach
  • HotSpot(20x faster)Lars Bak JIT Threads Assembler
  • non-blocking i/o VS blocking i/o
  • 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
  • Why Socket.io? Why Not WebSockets?
  • Features Transparent Transport API Authorization Timeouts Heartbeats / Disconnection Cross Browser + Mobile/Tablets Reconnection + Buffering Multiple Sockets with same connection Modules (session, logger, node2node, mq)
  • Multi-Transport Socket for
  • Select the best transport option: WebSocket Adobe® Flash® Socket AJAX long polling AJAX multipart streaming Forever Iframe JSONP Polling
  • [server.js]
  • [index.html]
  • $ 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 }
  • [calc.html]
  • $ 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}]}
  • Thank You!@diego_pachecoSoftware Architect | Agile Coach