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
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
620
CursorはMCPを使った方が良いぞ
taigakono
1
200
XP, Testing and ninja testing
m_seki
3
220
Hypervel - A Coroutine Framework for Laravel Artisans
albertcht
1
110
PipeCDのプラグイン化で目指すところ
warashi
1
210
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
600
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
240
GraphRAGの仕組みまるわかり
tosuri13
8
500
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
600
Team operations that are not burdened by SRE
kazatohiei
1
270
VS Code Update for GitHub Copilot
74th
1
480
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.4k
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
KATA
mclloyd
30
14k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Adopting Sorbet at Scale
ufuk
77
9.4k
Statistics for Hackers
jakevdp
799
220k
The Language of Interfaces
destraynor
158
25k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Practical Orchestrator
shlominoach
188
11k
What's in a price? How to price your products and services
michaelherold
246
12k
Automating Front-end Workflow
addyosmani
1370
200k
How to Ace a Technical Interview
jacobian
277
23k
Into the Great Unknown - MozCon
thekraken
39
1.9k
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