Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
LWPG: The Future Is Realtime
Search
miksago
October 20, 2011
Programming
4
990
LWPG: The Future Is Realtime
A slightly more technical version of the The Future Is Realtime talk I've been doing recently.
miksago
October 20, 2011
Tweet
Share
More Decks by miksago
See All by miksago
Introducing Realtime - Node.js Dublin
miksago
3
370
KRTConf: WebSockets & Sub-Protocols
miksago
1
680
Reject.js: The Future is Realtime
miksago
3
510
Cognac.js - Testing on the Rocks
miksago
2
170
London Ajax: The Future Is Realtime
miksago
3
160
LDNJS 05 - Node
miksago
6
280
Other Decks in Programming
See All in Programming
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
220
Git Rebase
bkuhlmann
11
1.6k
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
AWS Application Composerで始める、 サーバーレスなデータ基盤構築 / 20240406-jawsug-hokuriku-shinkansen
kasacchiful
1
260
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
750
Hanami and htmx
bkuhlmann
0
210
Git Lint
bkuhlmann
4
750
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
2 週間で Twitter Bot を作ってみた
contour_gara
0
460
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
1
110
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
190
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
27
8.3k
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
43
6.8k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
648
58k
Become a Pro
speakerdeck
PRO
11
4.5k
BBQ
matthewcrist
80
8.8k
Navigating Team Friction
lara
178
13k
A Philosophy of Restraint
colly
197
16k
Product Roadmaps are Hard
iamctodd
44
9.7k
RailsConf 2023
tenderlove
4
540
Optimizing for Happiness
mojombo
370
69k
Happy Clients
brianwarren
92
6.4k
Automating Front-end Workflow
addyosmani
1356
200k
Transcript
Micheil Smith - @miksago The future is realtime
I work at Pusher BUILDING THE REALTIME WEB
• Part 1: Background & History • Part 2: Using
the Realtime Web
• Part 1: Background & History • Part 2: Using
the Realtime Web
• Part 1: Background & History • Overview of the
past • The Shift to Realtime • Realtime Web in Action
• Overview of the past • The Shift to Realtime
• Realtime Web in Action
• Early web • PHP / LAMP Stack • MVC
• Social Web Overview of the past
http://www.mikealrogers.com/posts/a-new- direction-for-web-applications-.html Overview of the past
• Overview of the past • The Shift to Realtime
• Realtime Web in Action
The Shift to Realtime • The web has become more
interactive • Users expect things to be “now” • And why should they have to wait?
• We researched page-load time • We used AJAX to
decrease wait-time on interactions • We then tried to simulate “realtime” with AJAX and related technologies The Shift to Realtime
The Simulations of Realtime • HTTP Polling • LiveConnect •
Forever iFrame • XHR Long-polling • XHR Streaming
A more complete history http://blog.pusher.com/2011/8/10/what- came-before-websockets
Going Properly Realtime • HTML5 Introduces many new API’s •
One of those is WebSockets
What are WebSockets? • Bi-directional socket connection between browser and
server • API is fairly low level • Low-latency/high-frequency messaging
The Uses of WebSockets • Progressively Realtime Applications • Entirely
Realtime Applications • Multiplayer HTML5 Gaming
• Overview of the past • The Shift to Realtime
• Realtime in Action
Progressively Realtime Apps CloudApp Tastebuds
Collaborative Editing Codr.cc Google Docs
Realtime Analytics Guag.es
Realtime HTML5 Gaming Rawkets Metris
There’s a lot more uses...
...and even more that we haven’t thought of yet.
• Part 1: Background & History • Part 2: Using
the Realtime Web
var socket = new WebSocket('ws://localhost:8080/') socket.onopen = function() { /*...*/
}; socket.onmessage = function(messageEvent) { /*...*/ }; socket.onclose = function(closeEvent) { /*...*/ }; socket.onerror = function() { /*...*/ }; socket.send('my data'); The WebSocket API
var socket = new WebSocket(url, protocol) var socket = new
WebSocket(url, [protocol1, protocol2]) socket.addEventListener('open', function() { /*...*/ }); socket.addEventListener('message', /*...*/ ); socket.addEventListener('close', /*...*/ ); socket.addEventListener('error', /*...*/ ); The WebSocket API (alt)
WebSocket Servers • worlize/WebSocket-node • miksago/node-websocket-server • oberstet/Autobahn (python) •
igrigorik/em-websocket (ruby) • Jetty/7.5.2 (java) • ostinelli/misultin (erlang)
Warning! There are currently multiple versions of WebSockets supported by
Browsers, not all of the previously listed Servers support all the versions.
Extra’s!
Portland, OR 7th & 8th November http://krtconf.com Keeping It Realtime
Conference
Questions?
Thanks for listening! @miksago on Twitter / Github / Geekli.st