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
0
82
Kuiperbelt - Asynchronous protocol proxy
mackee
November 21, 2015
Tweet
Share
More Decks by mackee
See All by mackee
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
620
Agentに至る道 〜なぜLLMは自動でコードを書けるようになったのか〜
mackee
6
5.1k
今!ソフトウェアエンジニアがハードウェアに手を出すには
mackee
14
6.6k
ワンバイナリWebサービスのススメ
mackee
10
8.5k
tanukistack ライブコーディング / tanukistack live-coding
mackee
0
450
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
1.1k
perl for shell, awk and sed programmers
mackee
3
2.7k
今更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
960
Other Decks in Programming
See All in Programming
AI 開発合宿を通して得た学び
niftycorp
PRO
0
160
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.3k
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
7
2.9k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
530
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
580
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
380
Rethinking API Platform Filters
vinceamstoutz
0
140
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
140
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
120
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
170
[SF Ruby Feb'26] The Silicon Heel
palkan
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
910
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
240
Technical Leadership for Architectural Decision Making
baasie
3
300
For a Future-Friendly Web
brad_frost
183
10k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
Ethics towards AI in product and experience design
skipperchong
2
230
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
150
Utilizing Notion as your number one productivity tool
mfonobong
4
270
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
52k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
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!