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
2
5.6k
Server Push Middleware "Plasma"
stormcat24
April 29, 2017
Tweet
Share
More Decks by stormcat24
See All by stormcat24
素早く賢く失敗するDeveloper Productivityの実現を目指して
stormcat24
4
5k
KubernetesのマニフェストをそれなりにCIしたい
stormcat24
4
1.4k
令和時代のSaaS開発
stormcat24
1
280
History in 5 years of CircleCI and CyberAgent
stormcat24
3
860
Kubernetes Handson Osaka
stormcat24
5
580
Kubernetes Handson
stormcat24
5
4.3k
DockerとKubernetesでアプリケーション開発にコンテナをフル活用!
stormcat24
0
330
Base Image Journey 2018
stormcat24
29
140k
kotlin-fest
stormcat24
13
18k
Other Decks in Programming
See All in Programming
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
140
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
1
530
童醫院敏捷轉型的實踐經驗
cclai999
0
200
DroidKnights 2025 - 다양한 스크롤 뷰에서의 영상 재생
gaeun5744
3
330
Discover Metal 4
rei315
2
100
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
830
Bytecode Manipulation 으로 생산성 높이기
bigstark
2
390
PipeCDのプラグイン化で目指すところ
warashi
1
210
deno-redisの紹介とJSRパッケージの運用について (toranoana.deno #21)
uki00a
0
160
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.7k
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
580
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
670
Featured
See All Featured
The Invisible Side of Design
smashingmag
300
51k
Producing Creativity
orderedlist
PRO
346
40k
BBQ
matthewcrist
89
9.7k
Scaling GitHub
holman
459
140k
Become a Pro
speakerdeck
PRO
28
5.4k
Building Adaptive Systems
keathley
43
2.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
124
52k
How to train your dragon (web standard)
notwaldorf
94
6.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
GitHub's CSS Performance
jonrohan
1031
460k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Building Applications with DynamoDB
mza
95
6.5k
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!