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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
mackee
November 21, 2015
Programming
82
0
Share
Kuiperbelt - Asynchronous protocol proxy
mackee
November 21, 2015
More Decks by mackee
See All by mackee
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
940
Agentに至る道 〜なぜLLMは自動でコードを書けるようになったのか〜
mackee
6
5.8k
今!ソフトウェアエンジニアがハードウェアに手を出すには
mackee
14
7k
ワンバイナリWebサービスのススメ
mackee
10
8.8k
tanukistack ライブコーディング / tanukistack live-coding
mackee
0
650
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
1.1k
perl for shell, awk and sed programmers
mackee
3
2.8k
今更GoのWebフレームワークを作ろうとしているワケ / Why am I trying to create a Go web framework now?
mackee
1
1.1k
database/sqlでNullを扱う歴史とsql.Null[T]の登場 / sql.Null[T] history
mackee
0
990
Other Decks in Programming
See All in Programming
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
310
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.3k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.3k
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
470
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
270
RTSPクライアントを自作してみた話
simotin13
0
440
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
210
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
530
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
110
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
420
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
230
Claspは野良GASの夢をみるか
takter00
0
160
Featured
See All Featured
Prompt Engineering for Job Search
mfonobong
0
330
Un-Boring Meetings
codingconduct
0
310
Building the Perfect Custom Keyboard
takai
2
780
Leo the Paperboy
mayatellez
7
1.8k
Google's AI Overviews - The New Search
badams
0
1k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
The untapped power of vector embeddings
frankvandijk
2
1.7k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.6k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
320
Information Architects: The Missing Link in Design Systems
soysaucechin
0
960
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!