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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
EdamAmex
December 20, 2024
Technology
0
83
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
Phase12_総括_自走化
overflowinc
0
850
"作る"から"使われる"へ:Backstage 活用の現在地
sbtechnight
0
240
AIエージェント×GitHubで実現するQAナレッジの資産化と業務活用 / QA Knowledge as Assets with AI Agents & GitHub
tknw_hitsuji
0
160
「コントロールの三分法」で考える「コト」への向き合い方 / phperkaigi2026
blue_goheimochi
0
130
20260321_エンベディングってなに?RAGってなに?エンベディングの説明とGemini Embedding 2 の紹介
tsho
0
140
詳解 強化学習 / In-depth Guide to Reinforcement Learning
prinlab
0
360
Phase10_組織浸透_データ活用
overflowinc
0
940
品質を経営にどう語るか #jassttokyo / Communicating the Strategic Value of Quality to Executive Leadership
kyonmm
PRO
2
1k
スピンアウト講座05_実践活用事例
overflowinc
0
680
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
プラットフォームエンジニアリングはAI時代の開発者をどう救うのか
jacopen
8
4.2k
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
3
13k
Featured
See All Featured
It's Worth the Effort
3n
188
29k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
150
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Code Review Best Practice
trishagee
74
20k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
68
38k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
92
Rails Girls Zürich Keynote
gr2m
96
14k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
120
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
130
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
990
Discover your Explorer Soul
emna__ayadi
2
1.1k
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)