Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Socket.IO in Chess Realtime Multiplayer Web App...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Conferences Box
November 30, 2012
Technology
350
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Socket.IO in Chess Realtime Multiplayer Web Application
Conferences Box
November 30, 2012
Transcript
26 slides
Socket.IO in Chess Realtime Multiplayer Web Application @OmarQunsul
None
None
None
None
None
Websockets
None
Mozilla Firefox 4 in 2010 dropped the support for Websockets,
due to security issues.
What ?
None
http://www.socket.io
WebSocket Adobe® Flash® Socket AJAX long polling AJAX multipart streaming
Forever Iframe JSONP Polling
Server ( node.js ) Socket.IO Client Browser JS
NODE.JS ( Server ) var io = require('socket.io').listen(80); io.sockets.on('connection', function
(socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); });
NODE.JS ( Server ) var io = require('socket.io').listen(80); io.sockets.on('connection', function
(socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); });
NODE.JS ( Server ) var io = require('socket.io').listen(80); io.sockets.on('connection', function
(socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); });
Browser ( Javascript ) <script src="/socket.io/socket.io.js"></script> <script> var socket =
io.connect('http://localhost'); socket.on('news', function (data) { console.log(data); socket.emit('my other event', { my: 'data' }); }); </script>
Browser ( Javascript ) <script src="/socket.io/socket.io.js"></script> <script> var socket =
io.connect('http://localhost'); socket.on('news', function (data) { console.log(data); socket.emit('my other event', { my: 'data' }); }); </script>
Browser ( Javascript ) <script src="/socket.io/socket.io.js"></script> <script> var socket =
io.connect('http://localhost'); socket.on('news', function (data) { console.log(data); socket.emit('my other event', { my: 'data' }); }); </script>
Socket.IO + Express var app = require('express')() , server =
require('http').createServer(app) , io = require('socket.io').listen(server); server.listen(80); app.get('/', function (req, res) { res.sendfile(__dirname + '/index.html'); }); io.sockets.on('connection', function (socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); });
C++, Objective C, Ruby, Python, Erlang, Lua, Perl, Go, PHP
... and many more. Unofficial server side implementations
Desktop Internet Explorer 5.5+ ! Safari 3+ Google Chrome 4+
Firefox 3+ Opera 10.61+ Mobile iPhone Safari iPad Safari Android WebKit WebOs WebKit Browser Support
For more information, demos http://socket.io
chessduo.com and oh, my chess website is
Thanks !
More Decks by Conferences Box
See All by Conferences Box
Multiple dispatch
conferencesbox
1
67
JQuery UI Keynote
conferencesbox
1
110
Sensible Testing
conferencesbox
2
120
Redis Application Patterns in Rails
conferencesbox
1
130
Making the Web Faster
conferencesbox
2
86
Using Rails without Rails
conferencesbox
1
110
Stranger in These Parts
conferencesbox
1
86
One day of life in V8
conferencesbox
3
260
Continuous Deployment
conferencesbox
1
110
Other Decks in Technology
See All in Technology
AIエージェントのアーキテクチャ設計
nsatoh
0
540
SBOM 生成ツールで 2026 Minimum Elements はどこまで満たせるのか
gokken
0
160
ブース設計、 お前もプロダクトだったのか / So Booth Design Was a Product All Along
akihiro0038
0
150
Kubernetes, Agones, WebRTC, GPU で作る クラウドゲーミング基盤を本番運用に乗せるまで
vivion
0
270
gradle-best-practices 使ってみた
mikanichinose
0
230
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
5
600
20261119_AgentCore
takuyay0ne
2
240
AWS Client VPNの設定でハマったポイントとその過程での気づき
amarelo_n24
1
440
コーディングできない僕にBobが舞い降りた
shumpei3
0
200
成長するID管理基盤における運用もコストも犠牲にしないオブザーバビリティ向上の実践 / Improving Observability for a Growing Identity Platform Without Adding Operational Burden or Cost
kaminashi
1
130
エンタープライズIAMについて - ID・権限をどう統制するか
oidfj
1
310
【Oracle AI SPOTLIGHT ウェビナー】AI時代、狙われるデータと止められない業務をどう守るか?
oracle4engineer
PRO
1
140
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
880
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Un-Boring Meetings
codingconduct
0
510
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
250
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
4
1.3k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k