• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Socket.IO
 

Socket.IO

on

  • 15,498 views

Presentation from nodecamp.eu

Presentation from nodecamp.eu

Statistics

Views

Total Views
15,498
Views on SlideShare
15,475
Embed Views
23

Actions

Likes
13
Downloads
187
Comments
1

4 Embeds 23

http://paper.li 13
http://aws.w3db.us 5
http://www.linkedin.com 4
https://si0.twimg.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

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • socket.io v0.7 is great. Thanks a lot.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Socket.IO Socket.IO Presentation Transcript

    • GETTING DIRTY WITH 0.7SOCKET.IO
    • HELLO > WHOAMI
    • { "name": "socket.io" , "version": "0.7.0" , "description": "Real time apps made cross-browser & easy with a WebSocket-like API" , "keywords": ["websocket", "realtime", "socket.io", "comet", "ajax"] , "author": "Guillermo Rauch <guillermo@learnboost.com>" , "contributors": [ { "name": "Guillermo Rauch", "email": "rauchg@gmail.com" } , { "name": "Arnout Kazemier", "email": "info@3rd-eden.com" } ] , "repository":{ "type": "git" , "url": "https://github.com/LearnBoost/Socket.IO-node.git" } , "dependencies": {} , "main": "index" , "engines": { "node": ">= 0.4.0" }}
    • STALK ME ON TWITTER@3rdEden FORK ME ON GITHUB@3rd-Eden
    • WHAT IS SOCKET.IO
    • open source
    • REAL TIME
    • DIRTY
    • FAST
    • F*CKING AWESOME
    • CROSS BROWSER
    • CROSS BROWSERINCLUDING MOBILE & INTERNET EXPLORER 5
    • CROSS BROWSER ORLY? YA RLY
    • web socket
    • web socketflash socket
    • web socketflash sockethtml file (forever iframe)
    • web socketflash sockethtml file (forever iframe)xhr multipart
    • web socketflash sockethtml file (forever iframe)xhr multipartxhr polling
    • web socketflash sockethtml file (forever iframe)xhr multipartxhr pollingjsonp polling
    • community WATCHERS 2750+ FORKS 250+ PULL REQUESTS 110+GROUPS MEMBERS 1000~
    • NODE CAMP USERSY U NO FORK
    • WHATʼS NEW IN 0.7THE LESSONS WE LEARNED FROM 0.6
    • COMPLETE API REWRITE
    • var io = require(ʻsocket.ioʼ) , http = require(ʻhttpʼ);var s = http.createServer(function(q,r){r.writeHead(200);r.end(ʻsupʼ)});s.listen(80)io.listen(s); // uses existing server
    • var io = require(ʻsocket.ioʼ) , http = require(ʻhttpʼ);var s = http.createServer(function(q,r){r.writeHead(200);r.end(ʻsupʼ)});s.listen(80)io.listen(s); // uses existing servervar io = require(ʻsocket.ioʼ);io.listen(80); // creates one for us
    • var io = require(ʻsocket.ioʼ).listen();// express styled configurationio.configure(ʻdevelopmentʼ, function(){ io.set(ʻlog levelʼ, 3);});
    • MULTIPLEPROCESSES
    • NEW PROTOCOL
    • MESSAGE FLAGS FIRE AND FORGET, JSON NEW PROTOCOL
    • io.sockets.on(ʻconnectionʼ, function (socket) { socket.volatile.send(ʻpew pewʼ); socket.json.send([{nodecamp:ʻftwʼ}]);}; NEW PROTOCOL
    • ACKNOWLEDGEMENTS BETWEEN CLIENT & SERVER, SERVER & CLIENT NEW PROTOCOL
    • // server sideio.sockets.on(ʻconnectionʼ, function (socket) { socket.send(ʻbyeʼ, function () { // ack });});// client sidevar socket = io.connect();socket.send(ʻhiʼ, function () { // ack}); NEW PROTOCOL
    • NAMESPACING MULTIPLEXING NEW PROTOCOL
    • // server sideio.sockets.on(ʻconnectionʼ, function (socket) { socket.send(ʻbyeʼ, function () { // ack });});// client sidevar socket = io.connect();socket.send(ʻhiʼ, function () { // ack}); NEW PROTOCOL
    • HANDSHAKINGFUCK YEAH, SESSIONS SUPPORT NEW PROTOCOL
    • EVENTS NEW PROTOCOL
    • CODE SHARINGMODULES ARE REUSED ON THE CLIENT & SERVER
    • TESTINGBOTH FOR THE CLIENT AND THE SERVER
    • “ONE MORE THING™” © STEVE JOBS
    • RELEASE THIS WEEK
    • Q ATALK NERDY TO ME
    • presentation.end(‘thanks’);