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
クラウドに依存しないS3を使った開発術
simesaba80
0
210
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
150
愛される翻訳の秘訣
kishikawakatsumi
3
370
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
160
CSC307 Lecture 01
javiergs
PRO
0
650
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
チームをチームにするEM
hitode909
0
430
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.5k
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
900
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
500
ゆくKotlin くるRust
exoego
1
180
Navigating Dependency Injection with Metro
l2hyunwoo
1
200
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.1k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
How to make the Groovebox
asonas
2
1.9k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
39
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
43
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Discover your Explorer Soul
emna__ayadi
2
1k
Technical Leadership for Architectural Decision Making
baasie
0
200
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
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