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
Kill Pollingした話
Search
sutiwo
July 21, 2017
Programming
1.6k
1
Share
Kill Pollingした話
sutiwo
July 21, 2017
More Decks by sutiwo
See All by sutiwo
攻めつづける FRESH! のWeb ver.新春
sutiwo
3
5.3k
FRESH! クライアントサイドパフォーマンス改善
sutiwo
1
2.5k
Other Decks in Programming
See All in Programming
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
190
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
870
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
290
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
2
150
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.7k
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
2.9k
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
150
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
140
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
130
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
320
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.3k
Swift Concurrency Type System
inamiy
0
410
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
330
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
120
Fireside Chat
paigeccino
42
3.9k
ラッコキーワード サービス紹介資料
rakko
1
3M
Balancing Empowerment & Direction
lara
5
1k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
720
First, design no harm
axbom
PRO
2
1.2k
GraphQLとの向き合い方2022年版
quramy
50
14k
Design in an AI World
tapps
0
190
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.1k
Transcript
Kill Pollingͨ͠ 2017 7.21 Վب࠲.tech#13 ʮϑϩϯτΤϯυΞʔΩςΫνϟษڧձʯLT @su9wo
• su9wo / su9wo_ •CyberAgent, Inc. •ϑϩϯτΤϯδχΞ •FRESH! hKps:/ /freshlive.tv
•WebPush • hKps:/ /twiKer.com/FRESH_STAFF/status/887960571487764481 •Service Workerͷಋೖ • hKps:/ /developers.cyberagent.co.jp/blog/archives/6057/ •ΞΫηγϏϦςΟΨΠυϥΠϯʹج͍࣮ͮͨ
• hKps:/ /openfresh.github.io/a11y-guidelines/ ϑϩϯτνʔϜͰ࠷ۙͬͯΔ͜ͱ
Kill Polling͢Δཧ༝ • ଈ࣌ੑ͕ͳ͍ • ͍߹ΘͤܗࣜͳͷͰɺແବͳ௨৴ൃੜ • ͔ͬ͜ѱ͍
• ൪εςʔλεͷߋ৽ (։࢝์ૹதऴྃ) • ൪εςʔλεͷߋ৽ (ແྉ༗ྉ) • ࢹௌͷߋ৽ • ίϝϯτͷߋ৽
• ։࢝ɾऴྃ࣌ؒͷߋ৽ FRESH!ͰͷϢʔεέʔε
None
None
None
None
None
SSE (Server-Sent Events) • αʔό͔ΒΫϥΠΞϯτͷ୯Ұํ௨৴ • ςΩετͷΈ(όΠφϦbase64͢Δ) • IE11polyfill hKps:/
/github.com/Yaffle/EventSource/
Plasma • hKps:/ /github.com/openfresh/plasma • ΠϕϯτϓογϡͷϛυϧΣΞ • WebϒϥβSSE / ωΠςΟϒΞϓϦgRPC
• SSEʹΑͬͯαʔό͔ΒΠϕϯτΛड͚औΔ͜ͱ͕Ͱ͖Δ • ಙͷߴ͍ঁੑ༏͖Πϯλʔϯੜ࡞
ྲྀΕ • ॳظϨϯμϦϯά࣌ʹσʔλΛStoreʹอ࣋ • Plasmaଓ new EventSource(url, opts);ʹ.addEventListener(); • ߋ৽Λݕͨ͠ΒStoreͰJSON.parse,
Object.assignͰࠩΛ্ॻ͖ • ൪ऴྃޙߋ৽ͷඞཁ͕ͳ͘ͳͬͨΒ.removeEventListener();
σόοά • DevToolsͰΈΕ·͢
݁Ռ
ϙʔϦϯάͷϦΫΤετׂ߹ 0 % 7,5 % 15 % 22,5 % 30
% ϦϦʔεલ ϦϦʔε ϦϦʔεཌ ϦϦʔεཌʑ 0,85 % 1,43 % 21,15 % 27,8 %