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
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
390
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
1
590
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
250
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
290
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
520
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
820
Ethereum_.pdf
nekomatu
0
440
初めてDefinitelyTypedにPRを出した話
syumai
0
330
Click-free releases & the making of a CLI app
oheyadam
2
110
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
5
1.8k
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
510
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Unsuck your backbone
ammeep
668
57k
Docker and Python
trallard
40
3.1k
Side Projects
sachag
452
42k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
How GitHub (no longer) Works
holman
310
140k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Embracing the Ebb and Flow
colly
84
4.5k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Faster Mobile Websites
deanohume
305
30k
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