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
Server Push Middleware "Plasma"
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
stormcat24
April 29, 2017
Programming
2
5.8k
Server Push Middleware "Plasma"
stormcat24
April 29, 2017
Tweet
Share
More Decks by stormcat24
See All by stormcat24
素早く賢く失敗するDeveloper Productivityの実現を目指して
stormcat24
4
5.2k
KubernetesのマニフェストをそれなりにCIしたい
stormcat24
4
1.5k
令和時代のSaaS開発
stormcat24
1
320
History in 5 years of CircleCI and CyberAgent
stormcat24
3
880
Kubernetes Handson Osaka
stormcat24
5
620
Kubernetes Handson
stormcat24
5
4.4k
DockerとKubernetesでアプリケーション開発にコンテナをフル活用!
stormcat24
0
360
Base Image Journey 2018
stormcat24
29
140k
kotlin-fest
stormcat24
13
18k
Other Decks in Programming
See All in Programming
AtCoder Conference 2025
shindannin
0
1k
AI巻き込み型コードレビューのススメ
nealle
1
150
CSC307 Lecture 08
javiergs
PRO
0
670
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
920
CSC307 Lecture 04
javiergs
PRO
0
660
CSC307 Lecture 07
javiergs
PRO
0
550
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
190
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
7.1k
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
72
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
320
Paper Plane (Part 1)
katiecoart
PRO
0
4k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
So, you think you're a good person
axbom
PRO
2
1.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
84
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
140
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
How STYLIGHT went responsive
nonsquared
100
6k
Transcript
Server Push Middleware “Plasma” @stormcat24 2017.04.29 そうだ Go、京都。
‣ CyberAgent, Inc. ‣ FRESH! https://freshlive.tv ‣ FRESH!はmackerelを利用しています(これ大事) ‣ http://blog.stormcat.io
‣ ワタシGoチョットデキル ‣ 最近の興味はRustとKotlin stormcat24
天皇賞のついでに喋りに来ました
突然ですがポーリングしてますか
ポーリングのシーン・・・ ‣ アプリケーションの状態変化の検知 ‣ 通知を疑似的にServer Pushぽく見せたり ‣ Job Queueのロングポーリング
あまりにも多くの HTTPリクエストが討ち死にしてきた ほぼ同じレスポンスだというのに・・・ ※応仁の乱
世の中のポーリングを撲滅したい
https://github.com/openfresh/plasma
Plasma is ‣ Go製の汎用的なServer Push型ミドルウェア ‣ gRPC StreamとServer-Sent Event(SSE)に対応 ‣
Web/iOS/Android/Serverから状態変化検知を撲滅したくて構想 ‣ 実装はインターン生(@upamune)がほぼ一人でやった
クライアントは必要なイベントタイプを指定し、 subscribeするだけでデータが降ってくる
Plasmaへの接続 ‣ gRPC Streamの場合 ‣ proto定義がPlasmaのリポジトリにあるので、protogenでstubを作る ‣ SSEの場合 ‣ polyfillあります
https://github.com/Yaffle/EventSource ‣ サーバから一定期間データが来ないと接続が切れるブラウザがあるの で、Plasmaは切れないようにHeartbeatする
ユースケース ‣ 状態変化の監視のためポーリングをサーバプッシュに置き換える ‣ Microservices間で別のサービスで起きたイベントを受け取る ‣ Microservicesを跨いだキャッシュの伝搬(試験運用中!)
Server Pushはいいぞ
さあ、ポーリングの屍を乗り越えて行こう ※現在進捗10%
Thanks!