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
DenoでもBunでもいいから 最速を目指す
Search
Yusuke Wada
September 05, 2022
Programming
2
1.5k
DenoでもBunでもいいから 最速を目指す
Yusuke Wada a.k.a yusukebe
2022/09/05 Node学園 40時限目
Yusuke Wada
September 05, 2022
Tweet
Share
More Decks by Yusuke Wada
See All by Yusuke Wada
Remix on Hono on Cloudflare Workers
yusukebe
1
280
僕がつくった48個のWebサービス達
yusukebe
20
17k
Honoの来た道とこれから
yusukebe
19
3.2k
JS RPCを理解する
yusukebe
5
680
Honoとhtmx
yusukebe
6
1.8k
Cloudflare Workersの環境を再現することについて
yusukebe
7
1k
Hono v4
yusukebe
11
4.8k
Hono v3 and v4
yusukebe
4
3.8k
The power of Web-standards
yusukebe
4
1.7k
Other Decks in Programming
See All in Programming
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
280
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
EventSourcingの理想と現実
wenas
6
2.3k
Realtime API 入門
riofujimon
0
150
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
290
CSC509 Lecture 11
javiergs
PRO
0
180
Arm移行タイムアタック
qnighy
0
310
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
Quine, Polyglot, 良いコード
qnighy
4
640
みんなでプロポーザルを書いてみた
yuriko1211
0
260
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Navigating Team Friction
lara
183
14k
The Cult of Friendly URLs
andyhume
78
6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Happy Clients
brianwarren
98
6.7k
Making Projects Easy
brettharned
115
5.9k
Transcript
%FOPͰ#VOͰ͍͍͔Β ࠷Λࢦ͢ :VTVLF8BEBBLBZVTVLFCF /PEFֶԂ࣌ݶ
ࣗݾհ w :VTVLF8BEBBLBZVTVLFCF w ϘέͯDPGPVOEFS w :"1$"TJBϕεττʔΫड w גࣜձࣾτϥϕϧϒοΫ
εʔύʔόΠβʔ w UXJUUFSDPNZVTVLFCF w HJUIVCDPNZVTVLFCF /PEFֶԂॳࢀՃͰ͢
)POPͱ͍͏ϑϨʔϜϫʔΫΛ͍ͭͬͯ͘·͢ w 8FCϑϨʔϜϫʔΫɾϧʔλʔ w 8FC4UBOEBSE'FUDIͷ"1*ͷΈΛ༻ w ϚϧνϓϥοτϑΥʔϜ w $MPVE fl
BSF8PSLFSTɺ'BTUMZ$PNQVUF!&EHFɺ%FOPɺ#VO w ϛυϧΣΞͰػೳՃ w 5SJF3PVUFS EFGBVMU ͱ3FH&YQ3PVUFSͷͭͷϧʔλʔ͕͋Δ IUUQTIPOPKTEFW
)POPͷͭͷϧʔλʔ w 5SJF3PVUFS w 3FH&YQ3PVUFSCZ!VTVBMPNB w +4ͷΣϒϑϨʔϜϫʔΫͰߴͳϧʔλʔΛ࣮͢Δํ๏ 4QFBLFS%FDL w IUUQTTQFBLFSEFDLDPNVTVBMPNBVMUSBGBTUKTSPVUFS
6MUSBGBTU ͱʹ͔͍͘ϑϨʔϜϫʔΫΛࢦ͍ͯ͠Δ
%FOPɺ#VO w #VO w #VOJTBGBTUBMMJOPOF+BWB4DSJQUSVOUJNF IUUQTCVOTI w %FOP w
0VSHPBMJTUPNBLF%FOPUIFGBTUFTU+BWB4DSJQUSVOUJNF IUUQTEFOPDPNCMPHDIBOHFT )POPͲͪΒͰಈ͘ͷͰ %FOPͰ#VOͰͲ͜Ͱಈ͔͍͍͔ͯ͠Β Ұ൪͍ϑϨʔϜϫʔΫΛࢦͯ͠ΈΑ͏
8FCϑϨʔϜϫʔΫ͕͍ͱʁ
͍͍ͩͨ͜ͷͭΛଌΔ w )FMMP8PSME w ϧʔςΟϯά w 3FRVFTU3FTQPOTFͷॲཧ EFMWFEPSSPVUFSCFODINBSL 4BMUZ"PNCVOIUUQGSBNFXPSLCFODINBSL
طଘϕϯνϚʔΫPSΦϦδφϧ ͰଌͬͯΈΑ͏ .BD#PPL1SP.DPSF(#
%FOPɺ#VOͷલʹ/PEF
/PEFϧʔλʔฤ w EFMWFEPSSPVUFSCFODINBSL#FODINBSLPGUIFNPTUDPNNPOMZ VTFEIUUQSPVUFST IUUQTHJUIVCDPNEFMWFEPSSPVUFSCFODINBSL w /PEFͷओཁʮϧʔλʔʯͷϕϯνϚʔΫ w &YQSFTT
w LPBSPVUFS w LPBUSFFSPVUFS w fi OENZXBZ'BTUJGZͰΘΕ͍ͯΔ w USFLSPVUFS w FUD )POPͷݸΛ͋Θͤͯݸͷϧʔλʔ
Γํ ϧʔςΟϯάఆٛ ୟ͖ํ ͋͘·ͰϧʔςΟϯά 3FR3FTͷϋϯυϦϯά͠ͳ͍
݁Ռͦͷ Ґ Ґ
݁Ռ্Ґ Ґ Ґ Ґ
)POP Ґ Ґ ˎͪͳΈʹ)POPͷϧʔλʔෳͷϋϯυϥʹରԠͤͨ͞Γ ϓϥΠΦϦςΟ͕ෳࡶͩͬͨΓ͢Δ
ͪͳΈʹ#VOͩͱ
)POP3FH&YQ3PVUFS͕উͭ #VOͷਖ਼نදݱ͕͍ /PEFΑΓ͘ͳͬͯΔͷ ͳʹ͔ཧ༝͕͋Δͷ͔ͳ͍ͷ͔
͍Α͍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PTU+40/ w BXBJUBTZODΛ͏ͱ,JOH8PSMEͷύϑΥʔϚϯεམͪΔ w (&5 ͳͲಉظత w )POP ࣌
શͯͷϋϯυϥͰBXBJU͢Δॲཧ͕ೖ͍ͬͯͨ BTZODϋϯυϥͷαϙʔτ BXBJU͢Δॲཧ͕શϋϯυϥʹରͯ͠ߦΘΕ͍ͯͨ 1PTU+40/
BXBJUΛ͏ͱ͍ IUUQTHJUIVCDPNPWFOTICVOJTTVFT
+BSSFEొ IUUQTHJUIVCDPNPWFOTICVOJTTVFTJTTVFDPNNFOU 5IFSFJTTUJMMNPSFXPSLUPCFEPOF UPSFEVDF#VOTQSPNJTFBXBJUPWFSIFBE
WͰվળ ͨͩ͠ ˎ5IFNPSFHFOFSBMDBTFPGBTZODBXBJUQFSGPSNBODFCFJOHXPSTFJO+4$UIBO7JTTUJMMBOJTTVF
#VODBOBSZ ݈ಆͯ͠Δ
+BSSFEͷΞυόΠε ˎW͕ग़ΔલͰ͕͢ʜ
ϋϯυϥ͕Ұͭͷ߹DPNQPTF͠ͳ͍Α͏ʹͨ͠ IUUQTHJUIVCDPNIPOPKTIPOPQVMM
ABXBJUAΛগͳͨ͘͠ IUUQTHJUIVCDPNIPOPKTIPOPQVMM
#VOWDBOBSZ )POP "dependencies": { "@kapson fi re/bun-bakery": "^0.3.2", "@nbit/bun":
"^0.7.0", "baojs": "^0.1.3", "bunrest": "^1.1.0", "colstonjs": "latest", "express": "^4.18.1", "hyperbun": "^0.4.6", "kingworld": "^0.0.0-experimental.24" } )POP͍ͧ
࠷৽൛ #VOWDBOBSZ )POPIUUQTHJUIVCDPNIPOPKTIPOPUSFF FCFCDDGEDGCC "dependencies": { "@kapson fi re/bun-bakery": "^0.3.2",
"express": "^4.18.1", "fastify": "^4.5.3", "hyperbun": "^0.4.6", "kingworld": "^0.0.0-experimental.24" },
࠷৽ͷ݁Ռ IUUQTHJUIVCDPNZVTVLFCFXFCGSBNFXPSLCFODI
ͱ͍͏͜ͱͰ%FOPͰ#VOͰ ϑϨʔϜϫʔΫͷதͰ ˚Ұ൪͍ ⦿ҰೋΛ૪͏
͍ͬͨΜײ w ύϑΥʔϚϯεΛͱΔ͔ϝϯςφϏϦςΟΛͱΔ͔ʁ w 6MUSBGBTUΛΞΠσϯςΟςΟʹͯ͠ΔͷͰͳΔ͘͘ w ػೳ͋ΔͷͰ࠷େม w ϕϯνϚʔΫʮͳ·ͷʯ w
ϕϯνϚʔΫ͍͠ w ڥɺϥϯλΠϜͷ࣮ w #VOͷϨεϙϯεϔομʹA%BUFAϔομ͕ͳ͍FUD w ఢΛ࡞ΔՄೳੑ͕͋Δ
%FOP্ͱ#VO্ͳΒͲͪΒ͕͍ͷ͔ʁ %FOP fl BTI͍ #VO৽͍͠)POPͩͱ͍
ࡢڭ͑ͯΒͬͨϕϯνϚʔΫαΠτ IUUQTEFOPWTCVO fl ZEFW %FOP fl BTIͬͯͳ͍
#VOͰ੩తϑΝΠϧͷαʔϒΛ࠷దԽ͠Α ͏ͱ͍ͯ͠Δ
#VOͬͱ͘ͳΔ
ͪͳΈʹ%&-&5&͚ͩ3FRVFTUͷத ͕ۭʹͳΔόά͕͋Δ IUUQTHJUIVCDPNPWFOTICVOJTTVFT IUUQTHJUIVCDPNIPOPKTIPOPJTTVFT
%FOP
·ͩ͘ͳΔ
63-͕͍
͏*TTVFʹͳͬͯͨ IUUQTHJUIVCDPNEFOPMBOEEFOPJTTVFT
63-͡Όͳͯ͘ 63-4FBSDI1BSBNT͚ͩͰΑ͘ͳ͍ʁ
DSFRRVFSZͷߴԽ IUUQTHJUIVCDPNIPOPKTIPOPQVMM
Ҏ্ύϑΥʔϚϯε্͕ͬͨ IUUQTHJTUHJUIVCDPNZVTVLFCFGFEGEFFDEGE
ߴԽͱϕϯνϚʔΫ ଓ͍͍ͯ͘ʜ