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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
stormcat24
April 29, 2017
Programming
6k
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
380
History in 5 years of CircleCI and CyberAgent
stormcat24
3
930
Kubernetes Handson Osaka
stormcat24
5
660
Kubernetes Handson
stormcat24
5
4.6k
DockerとKubernetesでアプリケーション開発にコンテナをフル活用!
stormcat24
0
420
Base Image Journey 2018
stormcat24
30
140k
kotlin-fest
stormcat24
13
19k
Other Decks in Programming
See All in Programming
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
300
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
170
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.8k
Crash Auto Pipelines
veronikapj
1
410
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
3.8k
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
100
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
250
Next.js: The final boss of Web Performance
guaca
0
400
Performance Optimization With LLMs
xleitix
0
250
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
3
1.5k
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
370
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
590
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
380
Paper Plane
katiecoart
PRO
6
55k
How to build a perfect <img>
jonoalderson
1
6.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Navigating Weather and Climate Data
rabernat
0
590
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
630
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
Fireside Chat
paigeccino
43
4.1k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
610
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
330
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
470
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!