Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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.7k
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
310
History in 5 years of CircleCI and CyberAgent
stormcat24
3
870
Kubernetes Handson Osaka
stormcat24
5
600
Kubernetes Handson
stormcat24
5
4.4k
DockerとKubernetesでアプリケーション開発にコンテナをフル活用!
stormcat24
0
350
Base Image Journey 2018
stormcat24
29
140k
kotlin-fest
stormcat24
13
18k
Other Decks in Programming
See All in Programming
Microservices rules: What good looks like
cer
PRO
0
1.3k
20 years of Symfony, what's next?
fabpot
2
350
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.8k
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
120
AIコーディングエージェント(Gemini)
kondai24
0
210
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
210
WebRTC と Rust と8K 60fps
tnoho
2
2k
How Software Deployment tools have changed in the past 20 years
geshan
0
29k
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
110
FluorTracer / RayTracingCamp11
kugimasa
0
230
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
5
2k
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.3k
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.4k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.2k
Facilitating Awesome Meetings
lara
57
6.7k
What's in a price? How to price your products and services
michaelherold
246
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
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!