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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
540
Agentに至る道 〜なぜLLMは自動でコードを書けるようになったのか〜
mackee
6
5k
今!ソフトウェアエンジニアがハードウェアに手を出すには
mackee
14
6.5k
ワンバイナリWebサービスのススメ
mackee
10
8.5k
tanukistack ライブコーディング / tanukistack live-coding
mackee
0
400
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
950
Other Decks in Programming
See All in Programming
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
430
「抽象に依存せよ」が分からなかった新卒1年目の私が Goのインターフェースと和解するまで
kurogenki
0
100
Ruby x Terminal
a_matsuda
7
590
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
280
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
420
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
380
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
670
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
530
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
130
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
140
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
810
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
RailsConf 2023
tenderlove
30
1.4k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
99
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
68
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Design in an AI World
tapps
0
170
Product Roadmaps are Hard
iamctodd
PRO
55
12k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Building Adaptive Systems
keathley
44
2.9k
The browser strikes back
jonoalderson
0
780
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!