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
GAE 也沒那麼糟糕
Search
CQD
December 06, 2012
Programming
0
97
GAE 也沒那麼糟糕
好像一瞬間很多人吐嘈 GAE,平反一下...
CQD
December 06, 2012
Tweet
Share
More Decks by CQD
See All by CQD
開放原始碼的商業遊戲範例
cqd
1
180
Other Decks in Programming
See All in Programming
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
SourceGeneratorのススメ
htkym
0
200
dchart: charts from deck markup
ajstarks
3
1k
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
210
Data-Centric Kaggle
isax1015
2
780
CSC307 Lecture 08
javiergs
PRO
0
670
AtCoder Conference 2025
shindannin
0
1.1k
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
210
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
100
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
GraphQLとの向き合い方2022年版
quramy
50
14k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
New Earth Scene 8
popppiees
1
1.5k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Why Our Code Smells
bkeepers
PRO
340
58k
The Language of Interfaces
destraynor
162
26k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
How STYLIGHT went responsive
nonsquared
100
6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Transcript
GAE 也沒那麼糟糕
Google App Engine
OSDC 2012 對 GAE 怨念很深
None
None
None
不過我⽤用 GAE 的經驗 還沒那麼糟
- 有⼀一堆愚蠢的測驗 - 輸⼊入名字跳出蠢結果 - 可以⾃自製新測驗
- 有⼀一堆愚蠢的測驗 - 輸⼊入名字跳出蠢結果 - 可以⾃自製新測驗 算 Hash 當 Key
從數個陣列裡⾯面撈字串
撈測驗資料 名字算 HASH 組合結果字串 記錄測驗執⾏行次數 回傳 JSON
最⼤大流量 • 20 萬次結果 • 80 萬 req • 11
萬獨⽴立訪客 • 3GB/day • ~80 req/sec • 1.5 萬獨⽴立訪客/hr • ~80KB/sec
最⼤大流量 • 20 萬次結果 • 80 萬 req • 11
萬獨⽴立訪客 • 3GB/day • ~80 req/sec • 1.5 萬獨⽴立訪客/hr • ~80KB/sec 出帳的費⽤用是 0.26 美⾦金 不過還是要付低消 2.1$/week
我在意的點 • Datastore 存取 • Bandwidth • Instance Hour •
Other API usage
⼀一些想法
Cache
Cache Everything
撈測驗資料 名字算 HASH 組合結果字串 記錄測驗執⾏行次數 回傳 JSON Datastore Datastore
撈測驗資料 名字算 HASH 組合結果字串 記錄測驗執⾏行次數 回傳 JSON Datastore Datastore Memcache
撈測驗資料 名字算 HASH 組合結果字串 記錄測驗執⾏行次數 回傳 JSON Datastore Datastore Memcache
Staged in memory
撈測驗資料 名字算 HASH 組合結果字串 記錄測驗執⾏行次數 回傳 JSON Datastore Datastore Memcache
Staged in memory
• 節省 Datastore 操作 • 更快的 response time • 對「被瘋狂轉載的連結」有抵抗⼒力
• Cache 所有的 datastore query? • Objectify? • 預先載⼊入到 Memory?
• Local variable vs Memcache
Javascript
HTML vs AJAX 2.5KB vs 150Byte
Minify helps bandwidth with no price
<threadsafe>
None
Request is free Channel 好貴,polling 吧
結論
要多花點時間 但也沒那麼難搞
GAE 也沒那麼糟糕