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
stormcat24
April 29, 2017
Programming
5.9k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Server Push Middleware "Plasma"
stormcat24
April 29, 2017
More Decks by stormcat24
See All by stormcat24
素早く賢く失敗するDeveloper Productivityの実現を目指して
stormcat24
4
5.4k
KubernetesのマニフェストをそれなりにCIしたい
stormcat24
4
1.6k
令和時代のSaaS開発
stormcat24
1
350
History in 5 years of CircleCI and CyberAgent
stormcat24
3
910
Kubernetes Handson Osaka
stormcat24
5
640
Kubernetes Handson
stormcat24
5
4.5k
DockerとKubernetesでアプリケーション開発にコンテナをフル活用!
stormcat24
0
390
Base Image Journey 2018
stormcat24
30
140k
kotlin-fest
stormcat24
13
19k
Other Decks in Programming
See All in Programming
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
430
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
220
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
180
Creating Composable Callables in Contemporary C++
rollbear
0
190
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
14
2.8k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.6k
どこまでゆるくて許されるのか
tk3fftk
0
420
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
4.6k
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
100
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
790
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
500
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
250
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
960
Testing 201, or: Great Expectations
jmmastey
46
8.2k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
2
300
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
370
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
380
Ruling the World: When Life Gets Gamed
codingconduct
0
270
Technical Leadership for Architectural Decision Making
baasie
3
430
Abbi's Birthday
coloredviolet
3
8.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
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!