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
Web Communication APIs
Search
Adrian Olaru
September 27, 2011
Programming
3
130
Web Communication APIs
Web Messaging, Web Workers, Server Sent Events, Web Sockets
Adrian Olaru
September 27, 2011
Tweet
Share
Other Decks in Programming
See All in Programming
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
220
AWS発のAIエディタKiroを使ってみた
iriikeita
1
180
GitHubとGitLabとAWS CodePipelineでCI/CDを組み比べてみた
satoshi256kbyte
4
230
個人軟體時代
ethanhuang13
0
320
Swift Updates - Learn Languages 2025
koher
2
470
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
110
Design Foundational Data Engineering Observability
sucitw
3
200
知っているようで知らない"rails new"の世界 / The World of "rails new" You Think You Know but Don't
luccafort
PRO
1
110
私の後悔をAWS DMSで解決した話
hiramax
4
210
概念モデル→論理モデルで気をつけていること
sunnyone
1
110
Cache Me If You Can
ryunen344
2
720
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
4
1.4k
Featured
See All Featured
A Tale of Four Properties
chriscoyier
160
23k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
The Language of Interfaces
destraynor
161
25k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Making Projects Easy
brettharned
117
6.4k
The Invisible Side of Design
smashingmag
301
51k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
Docker and Python
trallard
45
3.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Building Adaptive Systems
keathley
43
2.7k
Transcript
Web Communication
[email protected]
None
Connectivity
Web Messaging Web Workers Server Sent Events Web Sockets
The way of the force
Sending complex data
Don’t trust client e.data Always check e.origin
allows documents from different domains to communicate with each other
in a secure way Web Messaging
Browser Support* 5.0+ 3.0+ 8.0 4.0+ 10.1+ * source: http://caniuse.com
None
None
Use Cases portals widgets ads traffic counters
Web Workers run JavaScript in parallel on a web page,
without blocking the user interface
Browser Support* 5.0+ 3.5+ 4.0+ 10.6+ * source: http://caniuse.com
None
None
Notes can’t access parent & it’s DOM ‘this’ == current
worker can use XHR, SSE or WebSocket can importScripts(‘script.js’) can use other workers can use timers (setTimeout, setInterval)
Server Sent Events push data from the server to the
client over HTTP
Browser Support* 6.0+ 4.0 5.0 11 * source: http://caniuse.com
None
None
None
None
None
Use Cases subscribe to live score real time polls bidding
updates for actions stock quotes live news
Web Sockets a bi-directional connection between the server and the
client
Browser Support* 5.0+ 4.0 5.0 11 * source: http://caniuse.com deactivated
by default * * *
None
None
None
Notes full duplex communication removes the overhead (only 2 bytes)
dramatically reduces complexity
Use Cases online chat online games realtime geolocation package tracking
Demos http://github.com/adrianolaru/webcom
None
Danke