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
A description of Hono Prepared Router
Search
EdamAmex
December 20, 2024
Technology
0
82
A description of Hono Prepared Router
A description of Hono Prepared Router
EdamAmex
December 20, 2024
Tweet
Share
Other Decks in Technology
See All in Technology
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
240
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
500
今日から始めるAmazon Bedrock AgentCore
har1101
4
420
Why Organizations Fail: ノーベル経済学賞「国家はなぜ衰退するのか」から考えるアジャイル組織論
kawaguti
PRO
1
200
ECS障害を例に学ぶ、インシデント対応に備えたAIエージェントの育て方 / How to develop AI agents for incident response with ECS outage
iselegant
4
350
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
93k
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.6k
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
400
【Oracle Cloud ウェビナー】[Oracle AI Database + AWS] Oracle Database@AWSで広がるクラウドの新たな選択肢とAI時代のデータ戦略
oracle4engineer
PRO
2
180
今こそ学びたいKubernetesネットワーク ~CNIが繋ぐNWとプラットフォームの「フラッと」な対話
logica0419
5
450
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
2.1k
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
260
Featured
See All Featured
Accessibility Awareness
sabderemane
0
56
Raft: Consensus for Rubyists
vanstee
141
7.3k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
150
Git: the NoSQL Database
bkeepers
PRO
432
66k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.4k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
130
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
170
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Transcript
Prepared Router
Process of Build 1. Lexer Path 2. Generate Conditions 3.
Rollup and Optimize 4. Dynamic Prediction
1. Lexer Path /book/:id /book/:id/:page{\\d+} /search/* separator static dynamic regex
wildcard analyze the routing path 2. Generate Conditions pathParts is an array separated by separators. pathParts[1] = ‘book’ !!pathParts[2] ... /\d+/.test(pathParts[3]) ... pathParts.length > 2 ... And generate params
3. Rollup and Optimize if (A) { if (B) {
... } } if (C) { if (A) { ... } } optimize conditions if (A) { if (B) { ... } if (C) { ... } } if B and C are exclusive (B⊕C) if (A) { if (B) { ... }else if (C) { ... } }
4. Dynamic Prediction cache static path POST /books/list This is
static path Routing with built matcher and cache the results const results = matcher(“POST”, “/books/list”, ...) // [/books/*, /books/list] cache(“POST”, “/books/list”, results)