Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Serverlessしかなかったので、ブラウザに働いてもらいました
Search
tanahiro2010
July 22, 2026
Programming
79
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Serverlessしかなかったので、ブラウザに働いてもらいました
https://serverlesslt.connpass.com/event/397581/
ここで登壇したやつ
tanahiro2010
July 22, 2026
More Decks by tanahiro2010
See All by tanahiro2010
Terraformで素数をマイニングしたら、ブロックチェーンが生まれた 〜 Infrastructure as Code。つまりCode。なら何でもできますよね? 〜
tanahiro2010
0
47
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
310
Serverlessのすゝめ
tanahiro2010
0
55
東京で唐揚げを食べたら北海道の地理にたどり着いた件
tanahiro2010
0
35
Googleが発表した新Web標準ドラフト――WebMCP。実際どうなの? IO Extendedで実装・登壇して分かったこと
tanahiro2010
0
120
PHPの命名規則、結局camelCaseとsnake_caseどっちなんだ
tanahiro2010
0
39
Q. 底辺作家でも流行に乗れば舞えますか? A. はい。分析ランキング分析AIを使えば
tanahiro2010
1
87
OSSコミュニティがくれた「人との繋がり」
tanahiro2010
2
490
React Hooksを使いこなせ! ――初心者でも簡単。ポートフォリオ開発で実践するReact講座.pdf
tanahiro2010
0
37
Other Decks in Programming
See All in Programming
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
260
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
610
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
300
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
3k
Getting Started with Vibe Coding
miccheng
0
180
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
5.1k
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
700
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
350
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.7k
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
260
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
150
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
510
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
490
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
400
Designing for Timeless Needs
cassininazir
1
550
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
The SEO identity crisis: Don't let AI make you average
varn
0
620
Skip the Path - Find Your Career Trail
mkilby
1
280
Paper Plane
katiecoart
PRO
5
54k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
The SEO Collaboration Effect
kristinabergwall1
1
610
A Soul's Torment
seathinner
8
3.9k
How STYLIGHT went responsive
nonsquared
100
6.3k
Transcript
Serverlessしかなかったので、ブラウザに働いても らいました PoWでランキングを守ってみた話 Serverless LT 1
自己紹介 田中博悠 / tanahiro2010 三田学園高等学校 1年生 TypeScript / Ruby Web
/ CLI 個人開発 OSSに少し貢献 小説も書く 2
皆さん 自分の謎のこだわりと 環境制限のせいで 暴走したこと、ありますか? 3
僕はあります ランキングを作りたかっただけなんです 4
作ったもの 「なんでも問題集」 匿名で問題を投げるサイト 技術 採用 Frontend Next.js Database Neon(PostgreSQL) Hosting
Vercel 全部サーバーレス 5
機能は素朴 誰でも匿名で 問題を作って投げる場所 問題の作成 公開 解く ランキング 力を入れたのは、解く場所とランキング つまり今回の本題。 6
問題 解かれた数ランキングを作りたい ぶっちゃけ、素直に増やすと死ぬ POST /solve 解いた扱い → while(true) fetch連打 →
ランキング終了 数字が壊れる APIだけだと弱い 7
どうする? ログイン? CAPTCHA? Turnstile? Rate Limit? どれも重い 8
サーバーレスの縛り 重い処理は無理 CPU時間が怖い DB直撃も怖い 課金も怖い でもログインは嫌 9
現実はもっと泥 起動待ちに怯える 権限設定で詰む ログ追跡がつらい 課金グラフを見る 夜中に眉間が寄る 10
結論 ブラウザに働かせる 11
以前Discord Botで PoWを書いた記憶が蘇った。 PoWで殴る 12
全体の流れ Browser お題を取る → PoW計算 nonce探し → Verify 結果を投げる →
Server検証 一瞬で見る → ランキング更 新 通れば加算 13
Challenge取得 GET /api/works/:id/challenges 返すもの prefix token(JWT) 端末で難易度を変える PC スマホ 14
検証 POST /api/works/:id/challenges/:challengeId 送信 nonce / token → サーバーで検証 条件だけ見る
→ ランキング更新 成功だけ反映 15
完璧? UA偽装 Bot突破 端末判定は雑 本気の攻撃は無理 でも、今回の狙いは 大量送信のコストを上げる ここだけ。 もちろん穴はある 16
PoWを書きたかった 実は…… これが理由の半分くらい。 個人開発だからこそ 「面白そう」 で突っ込めるのが最高。 17
サーバーレスだから 「できない」 ではなく どう実現する? 18
ご清聴ありがとうございました GitHub・質問などぜひ 19