SlideShare a Scribd company logo
GETTING DIRTY WITH 0.7


SOCKET.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 BROWSER
INCLUDING MOBILE & INTERNET EXPLORER 5
CROSS BROWSER
    ORLY? YA RLY
web socket
web socket

flash socket
web socket

flash socket

html file (forever iframe)
web socket

flash socket

html file (forever iframe)

xhr multipart
web socket

flash socket

html file (forever iframe)

xhr multipart

xhr polling
web socket

flash socket

html file (forever iframe)

xhr multipart

xhr polling

jsonp polling
community
      WATCHERS    2750+
         FORKS    250+
  PULL REQUESTS    110+
GROUPS MEMBERS    1000~
NODE CAMP USERS



Y U NO FORK
WHATʼS NEW IN 0.7
THE 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 server


var io = require(ʻsocket.ioʼ);
io.listen(80); // creates one for us
var io = require(ʻsocket.ioʼ).listen();

// express styled configuration
io.configure(ʻdevelopmentʼ, function(){
  io.set(ʻlog levelʼ, 3);
});
MULTIPLE
PROCESSES
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 side
io.sockets.on(ʻconnectionʼ, function (socket) {
  socket.send(ʻbyeʼ, function () {
   // ack
  });
});
// client side
var socket = io.connect();
socket.send(ʻhiʼ, function () {
  // ack
});
                              NEW PROTOCOL
NAMESPACING
   MULTIPLEXING




             NEW PROTOCOL
// server side
io.sockets.on(ʻconnectionʼ, function (socket) {
  socket.send(ʻbyeʼ, function () {
   // ack
  });
});
// client side
var socket = io.connect();
socket.send(ʻhiʼ, function () {
  // ack
});
                              NEW PROTOCOL
HANDSHAKING
FUCK YEAH, SESSIONS SUPPORT




                  NEW PROTOCOL
EVENTS


    NEW PROTOCOL
CODE SHARING
MODULES ARE REUSED ON THE CLIENT & SERVER
TESTING
BOTH FOR THE CLIENT AND THE SERVER
“ONE MORE THING™”
           © STEVE JOBS
RELEASE
  THIS WEEK
Q          A
TALK NERDY TO ME
presentation.end(‘thanks’);

More Related Content

PDF
Socket.io (part 1)
Andrea Tarquini
 
KEY
Socket.io
Timothy Fitz
 
KEY
Going real time with Socket.io
Arnout Kazemier
 
PPT
Real Time Communication using Node.js and Socket.io
Mindfire Solutions
 
PDF
Going realtime with Socket.IO
Christian Joudrey
 
PDF
Socket.IO - Alternative Ways for Real-time Application
Vorakamol Choonhasakulchok
 
KEY
Socket.io
Antonio Terreno
 
PDF
Socket.io under the hood
Haokang Den
 
Socket.io (part 1)
Andrea Tarquini
 
Socket.io
Timothy Fitz
 
Going real time with Socket.io
Arnout Kazemier
 
Real Time Communication using Node.js and Socket.io
Mindfire Solutions
 
Going realtime with Socket.IO
Christian Joudrey
 
Socket.IO - Alternative Ways for Real-time Application
Vorakamol Choonhasakulchok
 
Socket.io
Antonio Terreno
 
Socket.io under the hood
Haokang Den
 

What's hot (20)

PDF
LvivPy4 - Threading vs asyncio
Roman Rader
 
PPTX
node.js workshop- node.js middleware
Qiong Wu
 
PDF
NestJS
Wilson Su
 
PPTX
Perl: Coro asynchronous
Shmuel Fomberg
 
PDF
Realtime web applications with ExpressJS and SocketIO
Hüseyin BABAL
 
PDF
Introduction to asyncio
Saúl Ibarra Corretgé
 
PDF
aiohttp intro
Anton Kasyanov
 
PPTX
Nevermore Unit Testing
Ihsan Fauzi Rahman
 
PPTX
JavaScript Sprachraum
patricklee
 
PDF
Any event intro
qiang
 
PDF
Web3j 2.0 Update
Conor Svensson
 
PDF
Callbacks and control flow in Node js
Thomas Roch
 
PDF
Mirage For Beginners
Wilson Su
 
PDF
How to send gzipped requests with boto3
Luciano Mammino
 
PDF
Asynchronous Programming FTW! 2 (with AnyEvent)
xSawyer
 
PDF
IRC HTTP Stream in YAPC::Asia 2009
Yusuke Wada
 
PDF
Textile
Vanessa Lošić
 
PDF
Introduction to Nodejs
Gabriele Lana
 
PDF
Web Crawling with NodeJS
Sylvain Zimmer
 
PDF
Of Harmony and Stinginess: Applicative, Monad, and iterative library design
jspha
 
LvivPy4 - Threading vs asyncio
Roman Rader
 
node.js workshop- node.js middleware
Qiong Wu
 
NestJS
Wilson Su
 
Perl: Coro asynchronous
Shmuel Fomberg
 
Realtime web applications with ExpressJS and SocketIO
Hüseyin BABAL
 
Introduction to asyncio
Saúl Ibarra Corretgé
 
aiohttp intro
Anton Kasyanov
 
Nevermore Unit Testing
Ihsan Fauzi Rahman
 
JavaScript Sprachraum
patricklee
 
Any event intro
qiang
 
Web3j 2.0 Update
Conor Svensson
 
Callbacks and control flow in Node js
Thomas Roch
 
Mirage For Beginners
Wilson Su
 
How to send gzipped requests with boto3
Luciano Mammino
 
Asynchronous Programming FTW! 2 (with AnyEvent)
xSawyer
 
IRC HTTP Stream in YAPC::Asia 2009
Yusuke Wada
 
Introduction to Nodejs
Gabriele Lana
 
Web Crawling with NodeJS
Sylvain Zimmer
 
Of Harmony and Stinginess: Applicative, Monad, and iterative library design
jspha
 
Ad

Viewers also liked (8)

PDF
Web in real time - technical project - socket.io
Thomas Ferney
 
PPTX
Web socket with php v2
Leonardo Rifeli
 
PDF
Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...
Ivan Loire
 
PDF
WebRTC + Socket.io: building a skype-like video chat with native javascript
Michele Di Salvatore
 
PDF
Real-time Web Application with Socket.IO, Node.js, and Redis
York Tsai
 
PDF
TDC2016POA | Trilha Web - Realtime applications com Socket.io
tdc-globalcode
 
PDF
Django から各種チャットツールに通知するライブラリを作った話
Yusuke Miyazaki
 
PDF
NL20161222invited
Tetsuya Sakai
 
Web in real time - technical project - socket.io
Thomas Ferney
 
Web socket with php v2
Leonardo Rifeli
 
Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...
Ivan Loire
 
WebRTC + Socket.io: building a skype-like video chat with native javascript
Michele Di Salvatore
 
Real-time Web Application with Socket.IO, Node.js, and Redis
York Tsai
 
TDC2016POA | Trilha Web - Realtime applications com Socket.io
tdc-globalcode
 
Django から各種チャットツールに通知するライブラリを作った話
Yusuke Miyazaki
 
NL20161222invited
Tetsuya Sakai
 
Ad

Similar to Socket.IO (20)

PDF
Socket.io
Diego Pacheco
 
PDF
Nodejs and WebSockets
Gonzalo Ayuso
 
PPTX
Basic understanding of websocket and and REST API
divyabiru27
 
PDF
Node js oc meetup 2 socket io intro
eddify
 
KEY
Realtime rocks
Vanbosse
 
PDF
Unveil the Power of Socket.IO in Node.js
StudySection
 
PDF
Real-Time with Flowdock
Flowdock
 
PPTX
Socketio
Muhammed YALÇIN
 
ODP
SockJS Intro
Ngoc Dao
 
PPTX
Socket.io v.0.8.3
Cleveroad
 
PPTX
Socket.io v.0.8.3
Maryna Vasina
 
PDF
How to create a real time chat application using socket.io, golang, and vue js-
Katy Slemon
 
PDF
Socket.IO
Davide Pedranz
 
PDF
How to Build Real-time Chat App with Express, ReactJS, and Socket.IO?
Katy Slemon
 
PPTX
Webinar slides "Building Real-Time Collaborative Web Applications"
Sachin Katariya
 
PPTX
Intro to Web Sockets
Jim Gourgoutis
 
PPTX
Socket.pptx
NamoNarayan6
 
PPTX
WebSockets-Revolutionizing-Real-Time-Communication.pptx
YasserLina
 
KEY
Node.js - The New, New Hotness
Daniel Shaw
 
Socket.io
Diego Pacheco
 
Nodejs and WebSockets
Gonzalo Ayuso
 
Basic understanding of websocket and and REST API
divyabiru27
 
Node js oc meetup 2 socket io intro
eddify
 
Realtime rocks
Vanbosse
 
Unveil the Power of Socket.IO in Node.js
StudySection
 
Real-Time with Flowdock
Flowdock
 
SockJS Intro
Ngoc Dao
 
Socket.io v.0.8.3
Cleveroad
 
Socket.io v.0.8.3
Maryna Vasina
 
How to create a real time chat application using socket.io, golang, and vue js-
Katy Slemon
 
Socket.IO
Davide Pedranz
 
How to Build Real-time Chat App with Express, ReactJS, and Socket.IO?
Katy Slemon
 
Webinar slides "Building Real-Time Collaborative Web Applications"
Sachin Katariya
 
Intro to Web Sockets
Jim Gourgoutis
 
Socket.pptx
NamoNarayan6
 
WebSockets-Revolutionizing-Real-Time-Communication.pptx
YasserLina
 
Node.js - The New, New Hotness
Daniel Shaw
 

Recently uploaded (20)

PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
The Future of Artificial Intelligence (AI)
Mukul
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 

Socket.IO