Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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.5k
KubernetesのマニフェストをそれなりにCIしたい
stormcat24
4
1.6k
令和時代のSaaS開発
stormcat24
1
370
History in 5 years of CircleCI and CyberAgent
stormcat24
3
930
Kubernetes Handson Osaka
stormcat24
5
650
Kubernetes Handson
stormcat24
5
4.6k
DockerとKubernetesでアプリケーション開発にコンテナをフル活用!
stormcat24
0
410
Base Image Journey 2018
stormcat24
30
140k
kotlin-fest
stormcat24
13
19k
Other Decks in Programming
See All in Programming
mrbgem 三角測量 開発
ogom
0
230
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.2k
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
230
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
610
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
150
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
370
すこし踏み込む CancellationToken
htkym
2
1.7k
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
120
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
350
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
Featured
See All Featured
Code Review Best Practice
trishagee
74
20k
How to train your dragon (web standard)
notwaldorf
96
6.9k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
560
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
400
Between Models and Reality
mayunak
4
490
sira's awesome portfolio website redesign presentation
elsirapls
0
450
YesSQL, Process and Tooling at Scale
rocio
174
15k
30 Presentation Tips
portentint
PRO
1
430
Build your cross-platform service in a week with App Engine
jlugia
234
19k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Abbi's Birthday
coloredviolet
4
10k
Agile that works and the tools we love
rasmusluckow
331
22k
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!