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
文字コードの話
qnighy
44
17k
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
410
CSC307 Lecture 15
javiergs
PRO
0
240
Codex の「自走力」を高める
yorifuji
0
1.2k
20260315 AWSなんもわからん🥲
chiilog
2
150
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
250
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
510
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
420
Docコメントで始める簡単ガードレール
keisukeikeda
1
120
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
240
Unity6.3 AudioUpdate
cova8bitdots
0
130
AI 開発合宿を通して得た学び
niftycorp
PRO
0
120
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Cult of Friendly URLs
andyhume
79
6.8k
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
190
Speed Design
sergeychernyshev
33
1.6k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Amusing Abliteration
ianozsvald
0
130
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
450
Designing for Timeless Needs
cassininazir
0
160
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