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
Kuiperbelt - Asynchronous protocol proxy
Search
mackee
November 21, 2015
Programming
0
78
Kuiperbelt - Asynchronous protocol proxy
mackee
November 21, 2015
Tweet
Share
More Decks by mackee
See All by mackee
ワンバイナリWebサービスのススメ
mackee
10
7.8k
tanukistack ライブコーディング / tanukistack live-coding
mackee
0
100
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
640
perl for shell, awk and sed programmers
mackee
2
2.2k
今更GoのWebフレームワークを作ろうとしているワケ / Why am I trying to create a Go web framework now?
mackee
1
610
database/sqlでNullを扱う歴史とsql.Null[T]の登場 / sql.Null[T] history
mackee
0
500
マイクロサービス化を利用した Goへの移行事例
mackee
0
630
PerlでつくるフルスクラッチWebAuthn/パスキー認証 / Demonstration of full-scratch WebAuthn/Passkey Authentication written in Perl
mackee
3
4.5k
SRE定例やその辺の取り組みをアプリケーションエンジニア目線で語る / "Observe" about SRE Meeting by Application Engineer
mackee
0
1.9k
Other Decks in Programming
See All in Programming
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
150
統一感のある Go コードを生成 AI の力で手にいれる
otakakot
1
3k
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
210
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
420
つよそうにふるまい、つよい成果を出すのなら、つよいのかもしれない
irof
1
300
GraphRAGの仕組みまるわかり
tosuri13
7
470
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
100
AIネイティブなプロダクトをGolangで挑む取り組み
nmatsumoto4
0
120
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
370
技術同人誌をMCP Serverにしてみた
74th
0
170
カクヨムAndroidアプリのリブート
numeroanddev
0
440
A2A プロトコルを試してみる
azukiazusa1
2
960
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
246
12k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
700
The World Runs on Bad Software
bkeepers
PRO
69
11k
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
The Pragmatic Product Professional
lauravandoore
35
6.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Producing Creativity
orderedlist
PRO
346
40k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Speed Design
sergeychernyshev
31
1k
Transcript
Kuiperbelt Asynchronous protocol proxy for prefork backend.
Who am I ? • twitter: @mackee_w • PAUSE ID:
MACOPY • github: github.com/mackee • Yokohama.pm Co-mainterner(?)
What’s kuiperbelt? • Asynchronous protocol =WebSocket • Other protocols(not implement):
• HTTP2 MQTT memd(!?) etc…
What’s kuiperbelt? • kuiperbelt is… • WebSocket to HTTP1.x converter
• proxy, authentication mechanism and connection pooling
Motivation • Prefork(or blocking/synchronous) server has a problem of about
using websocket protocol. • Problems: • C10k • AnyEvent(Perl)/Eventmachine(Ruby) -> RDB Transaction • shared connection -> sticky session(?)
Conventional solution • Switch to a language that support concurrent
• code to trash!!! oh!!!! • pray and close eyes • C10k???? my code is not graceful but working now.
OTOH, Realtime application age • Server-side push • realtime paging????
huh????? • Planner’s imagination is infinite.
kuiperbelt flow: connection
Kuiperbelt flow: connection client kuipetbelt backend
Kuiperbelt flow: connection client kuipetbelt backend GET /connect with Upgrade
Kuiperbelt flow: connection client kuipetbelt backend proxy to endpoint
Kuiperbelt flow: connection client kuipetbelt backend authentication proxy query string
and header
Kuiperbelt flow: connection client kuipetbelt backend response with session key
header
Kuiperbelt flow: connection client kuipetbelt backend register session key
Kuiperbelt flow: connection client kuipetbelt backend upgrade to websocket
Kuiperbelt flow: server-side push
Kuiperbelt flow: server-side push client kuipetbelt backend POST /send with
session key header
Kuiperbelt flow: server-side push client kuipetbelt backend search session by
key
Kuiperbelt flow: server-side push client kuipetbelt backend write body to
connection
other features • server-side closing with message • close callback
to backend by client- side normally closing • switch binary/text frame
clusters • kuiperbelt is support single host application only. •
But does not mean there is no way. • Kuiperbelt server host name in header of /connect callback. • If you want to connection mapping to some kuiperbelt host, store this hostname in datastore.
implementation plan • (really) cluster support • Redis Pub/Sub or
MQTT backbone • DHT and sticky session? • documentation (oh…
Please try it!!! github.com/mackee/kuiperbelt
Thank you!