$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Node.js, Deno, Bun 最新動向とその所感について
Search
Yosuke Furukawa
PRO
March 14, 2025
Programming
10
4.6k
Node.js, Deno, Bun 最新動向とその所感について
2025/3/14 toranoana.deno #20 で発表した内容です。
Yosuke Furukawa
PRO
March 14, 2025
Tweet
Share
More Decks by Yosuke Furukawa
See All by Yosuke Furukawa
デザインシステムが必須の時代に
yosuke_furukawa
PRO
2
170
Welcome JSConf.jp 2024
yosuke_furukawa
PRO
1
4.4k
tc39 x jsconf.jp Panel Discussion 2024
yosuke_furukawa
PRO
0
280
Removing Corepack
yosuke_furukawa
PRO
9
1.7k
JavaScript Runtime とはなにか
yosuke_furukawa
PRO
15
2.9k
Strip Types と Storage
yosuke_furukawa
PRO
4
440
Module Harmony について
yosuke_furukawa
PRO
3
1.8k
LTのやり方
yosuke_furukawa
PRO
16
2.8k
AppRouter Panel Talk
yosuke_furukawa
PRO
3
840
Other Decks in Programming
See All in Programming
なぜ強調表示できず ** が表示されるのか — Perlで始まったMarkdownの歴史と日本語文書における課題
kwahiro
12
7.4k
2025 컴포즈 마법사
jisungbin
0
160
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
170
レイトレZ世代に捧ぐ、今からレイトレを始めるための小径
ichi_raven
0
480
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
270
Rails Girls Sapporo 2ndの裏側―準備の日々から見えた、私が得たもの / SAPPORO ENGINEER BASE #11
lemonade_37
2
190
GeistFabrik and AI-augmented software development
adewale
PRO
0
210
connect-python: convenient protobuf RPC for Python
anuraaga
0
310
Agentに至る道 〜なぜLLMは自動でコードを書けるようになったのか〜
mackee
5
2.5k
AWS CDKの推しポイントN選
akihisaikeda
1
210
CSC305 Lecture 17
javiergs
PRO
0
200
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
2
2.9k
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Context Engineering - Making Every Token Count
addyosmani
9
430
Building Applications with DynamoDB
mza
96
6.8k
We Have a Design System, Now What?
morganepeng
54
7.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The Language of Interfaces
destraynor
162
25k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Transcript
Node.js, Deno, Bun ࠷৽ಈͱ ͦͷॴײʹ͍ͭͯ 2025/03/14 @ toranoana.deno
X: @yosuke_furukawa GitHub: yosuke-furukawa
Node.js ࠷৽ಈͱઓུ • ࠷৽ಈ • TypeScript strip ϞʔυΛ࠾༻ • require(ESM)
Ͱ CJS ͱ ESM ͷஈ֊తҠߦΛαϙʔτ • EOLΛܴ͑ͨޙvulnerableͳϨϙʔτΛ͢Δ͔Ͳ͏͔ͳͲɺ EOLͷExtended Support ʹ͍ͭͯݴٴ
TypeScript strip mode • Denoͱ͔BunͰͬͯΔ .ts ϑΝΠϧͷܕͷ෦͚ͩΛநग़ ͯ͠ JavaScript ʹ࣮ͯ͠ߦ͢Δػೳ
• ୯ͳΔ strip ͳͷͰܕνΣοΫͱ͔͠ͳ͍ • ·ͨ enum namespace ͳͲͷTSಠࣗͷػೳαϙʔτ͞Ε ͍ͯͳ͍ʢ--experimental-transform-typesΛ͚ͭΔʣ
require(ESM) • ES Modules Ͱ require ͔ΒݺΔΑ͏ʹͳΔ • ͨͩ͠ Top
level await ͯ͠ΔϞδϡʔϧର֎ • A => B => C ͱґଘ͍ͯ͠Δͱ͖ʹ C ͕ESMʹͳͬͨͱ͜ΖͰ B͕CJSͩͱҠߦͰ͖ͳ͔͕ͬͨɺ͜Ε͔ΒC͕ESMͰB͔ Β require ͰݺΔͷͰҠߦ͕ஈ֊తʹਐΉ
EOL Support • EOL͕ΕͨޙͰݹ͍όʔδϣϯʹରͯ͠ Vulnerability Report Λ͍ͯ͘͠ํʹ • Node.js v16Λ͍ͬͯΔϢʔβʔ͕·ͩ·͍ͩΔ
• ݹ͍Node.jsΛԿʹΞοϓάϨʔυͤ͞Δ͔͕য • ͦΕͦΕͱͯ͠ɺࠓޙϢʔβʔ͕ͲͷNode.jsͷόʔδϣϯΛ͍ଓ͚͍ͯΔ͔Λཧ ղɾѲ͍ͯ͘͠ • HeroDev ͳͲ༻ϥΠηϯεͰԆαϙʔτ͢Δஂମग़͍ͯΔͨΊɺͦΕΒͱ࿈ܞ ΛऔΓͳ͕Β Extended EOL ࢹʹೖΕ͍ͯ͘ɻ
Node.js ࠷৽ಈαϚϦ • ཁଞͷϓϥοτϑΥʔϜʹޙ͍ͰػೳΛՃ͍ͯ͘͠ • ͞ΒʹEOLΛܴ͑ͨޙͷϨΨγʔͳNode.jsΛԿʹΞοϓά Ϩʔυ͍͖ͤͯ͞ɺ݈શͳঢ়ଶΛอ͔ͭΛ࣮ࢪ • ༻αϙʔτͰ͘EOLΛԆ͢Δ৫ग़͖͍ͯͯΔ ྑ͍ͱ͜ΖͲΓͭͭ͠ɺӡ༻໘ͰͷαϙʔτΛڧԽ͍ͯ͘͠
Deno ࠷৽ಈͱઓུ • ࠷৽ಈ • JSRΓ্͛ • Node.js Compatibility ্
• WASM module / OpenTelemetry ରԠͳͲͳͲ
JSRΓ্͛ • lint-rule Λ JSR ʹ publish ͢Δίϯςετ։࠵த • https://deno.com/blog/lint-rules-contest
• εςοΧʔͳͲΒ͑Δɻ • URL Import ໓ʹ͚ͯͷܒͳͲ • npm speci fi er ͚ͭͯͳ͍ͷؒҧ͍ • https://deno.com/blog/not-using-npm-speci fi ers-doing-it-wrong
Node.js Compatibility ্ • Node.js / npm ͱͷޓੑΛ্ͤ͞Δ • Next.js
͕ Deno Ͱಈͥ͘ʂʂʂ \űŒŕŰŖ!/ • https://deno.com/blog/nextjs-on-deno-deploy • ࠓੵۃతʹ sqlite ͳͲͷ৽APIΛରԠ͍ͯͬͯ͠Δ
WASM Module / Opentelemetry ରԠ • wasm ͕ module ͱͯ͠
import Ͱ͖ΔΑ͏ʹͳͬͨ • OpenTelemetry ϓϩτίϧʹରԠ͠ɺՄ؍ଌੑ্͕͕ͬͨ • etc
Deno ࠷৽ಈαϚϦ • ͳΜͱ͍ͬͯJSRΛྲྀߦΒͤΔ • npm ͔ΒΤίγεςϜΛҾ͖ܧ͍͗ͨ • ͦͷͨΊͷ Node.js
compat ΞήΞή • աڈͷ URL import ෛͷҨ࢈ Node.js / npm ͔ΒͲΕ͚ͩҨ࢈ΛҾ͖ܧ͛Δ͔͕ࠓޙͷ伴
Bun ࠷৽ಈͱઓུ • ࠷৽ಈ • Perf! Perf! Perf!! ύϑΥʔϚϯεͦ͜ਖ਼ٛʂʂ •
ඞཁͳΜɺͱΓ͋͑ͣશ෦ೖΕͱ͖·ͨ͠ʂʂʂ • Bun.sql, Bun.s3, ࠓ Bun.CSRF Ͱcsrf tokenݕূͰ͖ΔΑ͏ʹ͠· ͢ʂʂ • Node.js compatibility ্ʂʂʂ
Perf! Perf! Perf!! ύϑΥʔϚϯεͦ͜ਖ਼ٛ!! • Bunͷىಈ࣌ؒ5ms, Node.js 25ms!! 5ഒͩͧ5ഒʂʂ •
Bunͷhttp serve 59000 req/sec, Deno25000req/sec 2.4ഒͩ ͧ!! 2.4ഒ!! (ͪͳΈʹNode19000req/sec) • npm install ?? Bun install 25ഒ͍ͧʂʂʂ • https://bun.sh/docs/cli/install
ඞཁͳΜɺશ෦ೖΕͱ͖·ͨ͠!! • Bun.sql ͕ PostgreSQL ͷΫϥΠΞϯτʹʂʂࠓ MySQL ࣮͢ Δ༧ఆʂʂʢͳΜͪΎ͏໊લͩ...ʣ •
Bun.s3 ͕ Amazon S3 ͚ͩ͡Όͳ͘ɺCloudStorage ͱ͔ͷओͩͬͨ ΫϥυετϨʔδʹରԠʂʂʢͳΜͪΎ͏໊લͩ...ʣ • Bun.CSRF࣮ʂʂ Bun.CSRF.generate/verify ͰCSRFରࡦ͕Մೳ ʹʂʂʢ͍Δɾɾɾʁʣ
Node.js Compatibility ্!!! • Node.js test cases ΛͲΕ͚ͩpass͍ͯ͠Δ͔͕Ұྎવ • Next.js
? ࠷ॳ͔Βಈ͖·͚͢Ͳ? • ʢ͜͜ຊඍົɺશػೳ͕ಈ͘ͱݴͬͯͳ͍ʣ
Bun ࠷৽ಈαϚϦ • ύϑΥʔϚϯεͦ͜ਖ਼ٛ • ಠಛͷAPIηϯεʢ׳Εͳ͍ʣ • Node.js compat Λ্͍ͤͯ͘͞
ύϑΥʔϚϯεͱ͍͏Ұ൪ͷثΛҾͬఏ͛ͯͲ͜·ͰϢʔβʔΛ ֫ಘͰ͖Δ͔
ύωϧσΟεΧογϣϯ
͑ʔɺͰ͔͜͜Β ࢲ͕࢘ձͰ৭ʑฉ͍ͯΈ͍ͨͱࢥ͍·͢ɻ
ҰਓύωϧσΟεΧογϣϯΛͯ͠Έ·͢ Node.js: ݹ Deno: ݹ Bun: ݹ
Ұݸͷ࣭
WinterCG / WinterTC ʹ͍ͭͯ Ͳ͏ࢥͬͯ·͔͢ʁ
Node.js: ·͊جຊతʹϑΥϩʔ͍͔ͯ͘͠ͳɻ Minimum Common API Λ࡞ͬͯΔ James ͞Μ Node ͷ
TSC Ͱ͋Δ͠Ͷɻ
Deno: ඪ४ԽҕһձΛΉ͠Ζੵۃతʹࢧԉ͢Δ Goodbye WinterCG, Welcome WinterTC https://deno.com/blog/wintertc
Bun: ඪ४ԽʁͳʹͦΕ͓͍͍͠ͷʁ ஊஊ͆͆ ·͊WinterCGʹࢀՃ͠ͳ͍͚Ͳɺ༷͕ ·ͱ·͔ͬͯΒͰ͖Δͱ͜Ζ͔Βͬͯ͜͏ ͔ͳɻͦͦಉ͡ΰʔϧࢦͯ͠ͳ͍͔ͳ
WinterTC • WinterCG (Community Group) ͔Β WinterTC (Technical Committee) ʹɻ
• WinterTC༷ܾΊΛத৺ʹɻCGࠓ͜Ε͔Β࣮ఏҊ Λத৺ʹɻ • WinterTC͕ minimal API ΛܾΊ͍ͯ͘
My Opinion ※શͯݹͷҙݟͰ͋Γɺ࣮ࡍͷެࣜݟղ ͱҧ͍·͢ɻίϯτͰ͢ɻ
WinterTC • ಠࢢ͕࡞ΒΕͨޙʹ2ҐҎԼ͕݁ୗ༷ͯ͠ͷඪ४ԽΛݴ͍ग़͢ͷׂͱ͜Ε· ͰWebͷதͰΑ͋ͬͨ͘ྲྀΕ • ͨͩɺطଘͷWeb API͔ΒͱΓ͋͑ͣ࣋ͬͯ͘Δͷ͋Μ·Γྑ͍Α͏ʹࢥ͑ͳ͍ɻ • ݸਓతʹͦΕͧΕ͕͋Δఔ࣮ΛਐΊͳ͕ΒϛχϚϜͰඞཁͳAPIΛܾΊ͍ͯ͘ ํ͕͍͍ͷͰͳ͍͔ɻ
• ༷ΛઌʹܾΊΔΜ͡Όͳ͘ɺ࣮͔Β༷Λى͜͢Α͏ͳྲྀΕͰ͋Εɺ bun ΓؾʹͳΔͷͰʁ
WinterTC • एׯݒ೦͍ͯ͠Δͷϒϥβͱҧͬͯͦ͜·Ͱͷଟ༷ੑΛϢʔβʔ͕ٻΊ ͯΔͷ͔ඍົͳؾ͕͍ͯ͠Δ • ϒϥβੑೳͱ͔ػೳ໘Ͱͷڝ૪͕աܹԽͨ͜͠ͱʹΑͬͯϢʔβʔ͕ଟ ༷ʹͳΓɺϚϧνϒϥβରԠ͕ٻΊΒΕͨ͜ͱͰඪ४༷͕ඞཁʹͳͬͨ • ҰํͰNode.js/Deno/BunͰ։ൃऀ͕ଟ༷Խ͢Δ͕࣌དྷΔͷ͔ʁདྷΔͱ͠ ͨΒͲ͏͍͏ঢ়گͳͷ͔Α͘Θ͔͍ͬͯͳ͍ɻϚϧνϓϥοτϑΥʔϜର
Ԡ͕ٻΊΒΕΔ࣌ʹͳ͔ͬͯΒඪ४Խ͕ඞཁʹͳͬͨΓ͢Δͷ͔ʁ
ೋݸͷ࣭
TypeScript օ͞Μαϙʔτͯ͠·͚͢Ͳɺ ͓ޓ͍ΛͲ͏ࢥͬͯ·͔͢ʁ
Node.js: ͎͘ʔ͆͆αϙʔτ͠·ͨ͆͆͠ ࣮5Ҏ্લ͔ΒϦΫΤετࣗମ͋ͬͨ ͷͰ͕͆͆͢ ͣͬͱٞͯͯ͠ࠓͳΜͱͳ͘ํ͕·ͱ ·ͬͨͷͰ࣮ͯ͠Έͨ࣍ୈͰ͆͆͢ ͝ҙݟืूதͰ͆͆͢
Deno: ࠓߋ Node.js ͕αϙʔτͨ͠ͱ͔ݴͬͯΔ ͚Ͳɺαϙʔτͬͯݴ͑ΜͷʁܕνΣοΫػ ೳͳ͍͠ɻɻɻ ͦΕͰαϙʔτʁ
Bun: ·͊ࢲܕνΣοΫ͠ͳ͍ΜͰ͚͢ͲͶw ܕνΣοΫͱ͔ͯ͠ύϑΥʔϚϯε্͕Μ ͳ͍͍ͬͯ͏͔ɺཁΓ·͢ʁ Ͳ͏ͤΈΜͳtscೖΕͯvscodeͰνΣοΫ͢ Δͬ͠ΐʁ
Deno: ͍ɺTypeScript αϙʔτͬͯͦΕͰݴͬ ͯྑ͍ͱࢥͬͯΜͷʁ
Node.js: ·ʔ·ʔ·ʔ ͿͬͪΌ͚ࢲϓϥοτϑΥʔϜଆͰΒͳͯ͘ϑ ϨʔϜϫʔΫͱ͔͕ͬͯΔΜͰɻ ͦ͜·ͰੵۃతʹΒͳͯ͘ͳʔͱɻ ͋ͱɺtype check (tsc)ͱ transpile (swc)͕ҧ͏πʔϧ
ͳΜͰ͚͢ͲͦΕ͍͍Μ͔͢ʁʢ͜͜CV ͻΖΏ͖ʣ
Bun: ͋ͱ͞ɺJSRͰTypeScriptಈ͔͢ͷ͍͔ Βͬͯਪ͠ͳ͍͍ͯ͘Α͏ʹฦΓͷܕ Λ໌ࣔԽͤ͞Α͏ͱ͢ΔͷɺTypeScriptͷ ମݧଛͳ͏ΜͰɺΊͯΒ͍͍͔ͬͯͬ͢ ʢ͜͜ cv ͻΖΏ͖ʣ
Deno: ·ɺ·͊ TypeScript Go Ͱૣ͘ͳΕ͞ɺ ͦ͏͍͏ղܾ͞ΕΔ͠͞ɺ·͊ࠓ ͪΐͬͱΞϨ͚ͩͲ͞ɻɻɻ
My Opinion ※શͯݹͷҙݟͰ͋Γɺ࣮ࡍͷެࣜݟղ ͱҧ͍·͢ɻίϯτͰ͢ɻ
TypeScript αϙʔτ • Զ check ػೳ͕ͳ͍ͷʹNode/Bun͕αϙʔτͬͯݴͬͪΌͬͯΔ͚Ͳ͍͍ͷʁͱ ࢥͬͨΑɻ • ҰํͰαϙʔτͬͯ໘͍͘͞ͳͱࢥͬͨɻ •
ͱΓ͋͑ͣݴ͑Δͷ͏TypeScript͕ಉࠝ͞Ε͍ͯΔ͜ͱʹڝ૪༏Ґੑແ͍ؾ͕͢Δɻ • ͩͬͯผʹࣗͨͪͰͪΌΜͱΓ͍ͨਓtsc͔ΒͪΌΜͱڥ࡞Δ͠ɺͦΕ͕ݏͳਓͰ ͋ͬͯviteͱ͔next.jsͱ͔ͰΓ࢝ΊͨΒೖͬͯΔΜͩΜɻɻɻ • ͳ͙Γॻ͖ͰTypeScript࣮ߦ͍ͨ࣌͘͠Β͍͔ʁศརͳͷͬͯɻ
ࡾݸͷ࣭
ύʔϛογϣϯରԠͬͯ Ͳ͏ࢥ͍ͬͯ·͔͢ʁ
Node.js: ࣮ͯ͠Έ·ͨ͠ɻͰ Deno ͱҧͬͯΦϓτ ΠϯͰޙ͔Βݫ͘͠Ͱ͖ΔΑ͏ͳΦϓγϣϯ͕ ͚ΒΕ͚ͨͩͰ͢ɻ σϑΥϧτηΩϡΞ͡Όͳ͍Ͱ͢Ͷɻطଘͷ npm͕յΕͨΒΒͷΤίγεςϜऴΘΔΜͰɻ
Deno: ࢲͣͬͱͬͯ·͢Θɻͱ͍͏͔ͦΕ͕࠷ ॳͷίϯηϓτͰ͢Θɻ Secure By Defaultɺ҆શͰγϯϓϧɺ։ൃޮߴ͍ ͕ചΓͷDenoͰ͢ɻΑΖ͓͘͠ئ͍͠·͢
Bun: Permission? ͍ͦΕ͘ͳΒͳ͍ͭͬ͢ ΑͶʁ ͘ͳΒͳ͍ͷ͏ͪΒͳ͍Μ͢Αɻ ηΩϡϦςΟʁʁʁ
Deno: ܅ϚδͰͳ͍Θʔɻɻɻ ͑ɺͲ͏ࢥͬͯΜͷɺࠓͷαϓϥΠνΣʔϯΞλοΫͱ͔͞ɻ ͍͖ͳΓεΫϦϓτͷதͰϚΠχϯάͱ͔͞ΕͪΌ͏Αʁใ ࿙Ӯ͞ΕͪΌ͏Αʁ
Node.js: ͍ɺ܅ͷͱ͜Ζ --allow-all ͯ͠Δਓͨͪͨ͘ ͞ΜݟΔ͠ɺӡ༻ָ͍ͨ͠ਓ͕ͨͪͬͨΒ݁ہ ى͖ΔΜͪΌ͏Μʁ
Bun: SELinux ͱ͔݁ہ disabled ʹͳͬͯͨΓ ͱ͔Ͷɻݖݶཧͦͷͷ͕ਓྨʹૣ͗ͨ͢ ΜΑɻΨνΨνʹݻΊͯޙ͔ΒΦϑʹ͞Ε ͨΓ͢ΔΜΑɻ
Deno: ύʔϛογϣϯཧͰ͖ͳ͍ͭͬͯΖ
My Opinion ※શͯݹͷҙݟͰ͋Γɺ࣮ࡍͷެࣜݟղ ͱҧ͍·͢ɻίϯτͰ͢ɻ
ύʔϛογϣϯ • ͜͜ʹ͍͔ؔͯͭ͘͠ݴ͍͍ͨ͜ͱ͕͋Δ • ·ͣݖݶཧ͚ͩͰαϓϥΠνΣʔϯΞλοΫ͖͗Εͳ͍ɻͳͥͳΒιϑτΣΞͷ։ൃͷͲ͜Ͱࠞ ೖ͢Δ͔JSϓϥοτϑΥʔϜ͚ͩͰ͗Α͏͕ͳ͍͔Βɻ • Docker ʁ 3rd
party script ʁ poly fi ll.io ͕ങऩ͞Εͯͦ͜Λಥ͔ΕͨΒʁͳͲΓ͕ແ͍ • ͲͪΒ͔ͱ͍͏ͱɺଟతʹޚ͢ΔΈ͕ඞཁɻෆԺͳϓϩηεͷࢹɺΞτόϯυͷϦΫΤετ ͕Ͳ͜ʹߦͬͯΔ͔ɺมʹϦιʔε৯ͬͯΔϓϩηε͍ͳ͍͔ͳͲɻ • JSR / npm ͕ͬͯΔΑ͏ͳॺ໊͖Ͱվ͟Μݕূ͕Ͱ͖ΔΈඞཁ • ͳͷͰɺDeno͕ͬͯΔύʔϛογϣϯࣗମͦͷଟԽͷͷҰͭʹ͗͢ͳ͍ɻݴͬͯ͠·͑ɺ͋Δ ͱྑ͍͚Ͳͳͯ͘ΫϦςΟΧϧ͡Όͳ͍ɻ
ύʔϛογϣϯ • ࣍ʹͦͦਓ͕ؒӡ༻͢ΔҎ্ɺָΛͨ͘͠ͳΔɻ • σϑΥϧτ͕ݫ͍͠ͱΦϑʹ͞ΕΔࣄ͕ଟ͍ɻ • SELinux ͔͠Γɺదͳݖݶઃܭ͕ OS /
Platform ͷϨΠϠͰͪΌΜͱͰ͖ͨ ͷΛݟͨ͜ͱ͕ͳ͍ • ͦͦOSͷϢʔβʔͷݖݶཧ͔ͬ͠ΓͰ͖͍ͯͯɺΞϓϦέʔγϣϯ ϓϩηε࣮ߦ͝ͱʹϢʔβʔͷݖݶΓ͚Δͱ͔͕Ͱ͖ΔͳΒͦΕͰྑ͍ ͣɺຖճswitch user͠ͳ͕ΒΔͷେมͩΖ͏͚Ͳɻ
࢛ݸͷ࣭
Bun API ֦ுΤά͗͢͡ΌͶʁʹ͍ͭͯͲ ͏ࢥ͍·͔͢ʁ
Bun: ֦ு͕Τά͍ʁͳʹ͔ͰʁࢲΈΜͳͱ ಉ͡ΰʔϧࢦ͍ͯ͠ͳ͍Μ͢Θɺ࠷͔ͭ ࠷ڧɺࢦͯ͠ΔΜͰɻ
Deno: ͍ɺ͓લશવWinterTCͱ͔ೖΜͶʔΑ ͳɻಠ֦ࣗு͕ଟ͗͢ΔͩΖɻͳΜͩ Console Λ for-of ͰҰߦͣͭճͤΔΑ͏ʹ ͢ΔṖͷ֦ு
Node.js: ͋ͱɺ͓લ Bun.s3 ͱ͔͍ͬͯશવs3͡ΌͶʔ ͠ɺBun.sql ͰPostgresରԠͱ͔ɺAPIͷ໊લͲ͏ ͳͬͯΜͷɻͳΜͰ Bun.xxx ʹͱΓ͋͑ͣੜ ͢ͷ͍Ζɻ
Bun: ฉ͑͜·ͤΜɻศརͩ͠ྑ͘ͳ͍͔ͬ͢ʁ ͑ɺօ͞Μ jsr add ͱ͔ npm install ͱ͔͠ ͳ͍ͱpostgresݺͳ͍ײ͡ʁͦΕͰ͠
͔͍ͷʁࢲɺpostgres࠷ͳΜͰ (50000 req/sec)
Deno: APIͷ໊લ͍͍ΑɻͲ͔ͬͪͬͭʔͱɺWeb API ෩ʹ࡞ͬ ͓͍ͯͯͦΕݺΜͩΒಠࣗͰͥΜͥΜҧ͏ಈ͖͢ΜͳΑɻ fetch ʹ proxy Φϓγϣϯͱ͔ੜͨ͠Γͱ͔͞ɻɻɻ ҙݟ͕͋ΔͳΒWinterTCʹೖͬͯݴ͑Αɻ
Bun: Ͳ͏ͤฉ͍ͯ͘Εͳ͍ͬ͠ΐʁ
Deno: ͦ͏ܾͬͯΊ͚ͭͯಀ͛ΜͳΑ
My Opinion ※શͯݹͷҙݟͰ͋Γɺ࣮ࡍͷެࣜݟղ ͱҧ͍·͢ɻίϯτͰ͢ɻ
Bun API ֦ுΤά͘Ͷ • Τά͍ͬͪΌΤά͍Μ͚ͩͲɺWinterTC࢝·͔ͬͨΓͰԿͰͦΕʹैΘͳ ͖Ό͍͚ͳ͍ͱ͍͏͜ͱͰͳ͍ͷͰͳ͍͔ɾɾɾʁ • ૬ޓޓੑ͕ඞཁͳϑΣʔζ͕དྷͨΒ͓ޓ͍ΓΌ͍͍ͷͰɻݴ͍͑Δͱ·ͩ૬ ޓޓੑΛอͪ·͠ΐ͏ͱݴͬͯϧʔϧΛकΔڧ੍ྗ͕ബ͍ͱ͍͏͔ɺϝϦοτ͕ ͋Μ·Γແ͍͔ΒΒΕ͍ͯͳ͍͚ͩͳؾ͕͢Δɻ
• ඪ४༷͔ͩΒͱ͍ͬͯϒϥβͱঢ়گ͕ҧ͏ؾ͕͢Δ • API ͷηϯεඍົͰ͋Δ͕ɺͱΓ͋͑ͣศརͳͷೖΕ·͔ͬͯͦ͘͜ΒΘΕͳ ͔ͬͨΒফ͍ͯ͘͠ͱ͍͏ٯΤοηϯγϟϧࢥߟ
·ͱΊ • ΈΜͳҧͬͯΈΜͳ͍͍ • લ͔Βൺֱ͢ΔͱେͲ͜ࣅ͖ͯͨɺࠣͳࠩͰ্Լ͍ͯ͠Δ • ੑೳɾ։ൃऀମݧڝ૪͕݈શʹੜ·ΕͯΔͷྑ͍ • ҰํͰ͜ͷػೳ͕͋Δ͔Β͜ΕΛ͍͍͍ͨͬͯ͏ࠩผԽͰ͖Δॴ͕গͳ͍ •
݁ՌNode.js͕ͳΜͱͳ͘ΘΕͯ͠·͏ • ΩϥʔϑΟʔνϟʔ͕ग़͖ͯͯ΄͍͠
None