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.8k
2
Share
Server Push Middleware "Plasma"
stormcat24
April 29, 2017
More Decks by stormcat24
See All by stormcat24
素早く賢く失敗するDeveloper Productivityの実現を目指して
stormcat24
4
5.3k
KubernetesのマニフェストをそれなりにCIしたい
stormcat24
4
1.5k
令和時代のSaaS開発
stormcat24
1
340
History in 5 years of CircleCI and CyberAgent
stormcat24
3
900
Kubernetes Handson Osaka
stormcat24
5
630
Kubernetes Handson
stormcat24
5
4.5k
DockerとKubernetesでアプリケーション開発にコンテナをフル活用!
stormcat24
0
380
Base Image Journey 2018
stormcat24
30
140k
kotlin-fest
stormcat24
13
18k
Other Decks in Programming
See All in Programming
The Less-Told Story of Socket Timeouts
coe401_
3
690
AIと共に生きる技術選定 2026
sgash708
0
110
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
730
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
120
CDK Deployのための ”反響定位”
watany
5
890
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
440
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
160
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
2.7k
アーキテクチャモダナイゼーションとは何か
nwiizo
19
5.5k
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
170
Programming with a DJ Controller — not vibe coding
m_seki
3
480
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
200
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
410
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
The Curious Case for Waylosing
cassininazir
0
320
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
170
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Mind Mapping
helmedeiros
PRO
1
170
Code Review Best Practice
trishagee
74
20k
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!