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
构建异步API服务
Search
flyerhzm
May 12, 2013
Technology
19
7.1k
构建异步API服务
flyerhzm
May 12, 2013
Tweet
Share
More Decks by flyerhzm
See All by flyerhzm
玩转 AST
flyerhzm
0
150
Find and Replace Code based on AST
flyerhzm
0
210
Rails Performance Tips
flyerhzm
0
1.2k
Refactor ruby code based on AST
flyerhzm
4
3.5k
基于AST的代码优化
flyerhzm
10
770
Write ruby code to change ruby code
flyerhzm
5
3.5k
Building Asynchronous APIs
flyerhzm
25
8.9k
JRuby @ OpenFeint
flyerhzm
23
3.1k
Other Decks in Technology
See All in Technology
Gradle: The Build System That Loves To Hate You
aurimas
2
140
Automated Promptingを目指すその前に / Before we can aim for Automated Prompting
rkaga
0
110
急成長中のWINTICKETにおける品質と開発スピードと向き合ったQA戦略と今後の展望 / winticket-autify
cyberagentdevelopers
PRO
1
160
わたしとトラックポイント / TrackPoint tips
masahirokawahara
1
240
Fargateを使った研修の話
takesection
0
110
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
pandasはPolarsに性能面で追いつき追い越せるのか
vaaaaanquish
4
4.5k
10分でわかるfreee エンジニア向け会社説明資料
freee
18
520k
プロダクトエンジニアが活躍する環境を作りたくて 事業責任者になった話 ~プロダクトエンジニアの行き着く先~
gimupop
1
480
クライアントサイドでよく使われる Debounce処理 をサーバサイドで3回実装した話
yoshiori
1
150
【若手エンジニア応援LT会】AWSで繋がり、共に成長! ~コミュニティ活動と新人教育への挑戦~
kazushi_ohata
0
180
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
160
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
88
5.7k
The Invisible Side of Design
smashingmag
297
50k
Visualization
eitanlees
144
15k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
13
1.9k
Documentation Writing (for coders)
carmenintech
65
4.4k
Automating Front-end Workflow
addyosmani
1365
200k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
107
49k
RailsConf 2023
tenderlove
29
880
Practical Orchestrator
shlominoach
186
10k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Transcript
构ݐ䇗㑊తAPI务 ԫࢤහ Sunday, May 12, 13
ࣗզհ绍 ࣗ༝职业ऀ 䇖ݯ爱ऀ flyerhzm at github, twitter, gmail, etc. Sunday,
May 12, 13
䇖发᠓తୈҰ选择 Sunday, May 12, 13
Rails 䇖发շ 䇖发ऀ众ଟ ࣾ۠庞େ Sunday, May 12, 13
Rails ֶ习ຊߴ 运ߦຫ 惯ᆀఔং员 Sunday, May 12, 13
䘦છHTMLඇৗຫ Sunday, May 12, 13
JSON API务շ Sunday, May 12, 13
API务 对֎ఏڙޱ 单页໘应༻ ʢJavascript MVCʣ ٬户应༻ ʢiOSɼAndroidʣ Sunday, May 12,
13
CPU VS IO Sunday, May 12, 13
ଟ进ఔ ॆར༻ଟ֩ 稳ఆɼ݈ ଘ䇖销େ ʢcopy on writeʣ 进ఔ间换䇖销େ Sunday, May
12, 13
ଟ线ఔ 资ݯڞڗɼ节লଘ 线ఔ间换䇖销૬对较খ GILᏠ๏ར༻ଟ֩ ʢJRubyʣ 线ఔ锁问题 Sunday, May 12, 13
ଟ进ఔ + ଟ线ఔ Sunday, May 12, 13
䇗㑊ඇ્࠹I/O Sunday, May 12, 13
Node.jsʁ Sunday, May 12, 13
EventMachine Sunday, May 12, 13
EMత᠍ վ变编ఔ习惯 ଠଟճ调 Sunday, May 12, 13
EMత᠍ Sunday, May 12, 13
EventMachine + Fiber = EM::Synchrony Sunday, May 12, 13
EM::Synchrony Sunday, May 12, 13
EM::Synchrony Sunday, May 12, 13
EM::Synchrony ࣸಉ㑊త码 运ߦ䇗㑊త码 Sunday, May 12, 13
ଟ进ఔ + evented Sunday, May 12, 13
OpenFeintత经验 Sunday, May 12, 13
OpenFeintʢഉߦᒗʣ ଟ进ఔ (REE 1.8.7 Mysql) 1.5k rps (6进ఔ * 13صثʣ=>
20 rps / 进 ఔ Sunday, May 12, 13
OpenFeintʢഉߦᒗʣ ଟ线ఔ ʢJRuby 1.7.0 Mysqlʣ 1.5k rps (6线ఔ * 1进ఔ
* 10صثʣ=> 25 rps / 线ఔ Sunday, May 12, 13
GREEʢഉߦᒗʣ Goliath (Ruby 1.9.3 Mysql + Redis) 4k rps (4进ఔ
* 4صثʣ=> 250 rps / 进ఔ 90% CPU / 进ఔ 50M / 进ఔ Sunday, May 12, 13
ੑೳ测试 Կجဋhello worldతੑೳ测试ੋ䳭ྲྀᔁ Sunday, May 12, 13
ഉߦᒗ API https:/ /github.com/flyerhzm/apis-bench Sunday, May 12, 13
rails / rails-api sinatra grape sinatra + sinatra-synchrony grape +
goliath ඇ્࠹IO ્࠹IO Sunday, May 12, 13
rails Sunday, May 12, 13
rails-api Sunday, May 12, 13
sinatra Sunday, May 12, 13
grape Sunday, May 12, 13
sinatra-synchrony (thin) Sunday, May 12, 13
grape + goliath Sunday, May 12, 13
ab测试 ab -n 1000 -c 1 /leaderboards/1000/users.json rails rails- api
sinatra sinatra- synchrony grape grape + goliath time taken 18.670 17.465 15.924 8.764 16.719 11.750 Sunday, May 12, 13
ab测试 ab -n 1000 -c 50 /leaderboards/1000/users.json rails rails- api
sinatra sinatra- synchrony grape grape + goliath time taken 16.424 16.445 16.023 9.336 14.769 8.261 Sunday, May 12, 13
ab测试 ab -n 1000 -c 60 /leaderboards/1000/users.json rails rails- api
sinatra sinatra- synchrony grape grape + goliath time taken xxx xxx xxx xxx Sunday, May 12, 13
ab测试 ab -n 1000 -c 100 /leaderboards/1000/users.json rails rails- api
sinatra sinatra- synchrony grape grape + goliath time taken xxx xxx xxx 8.080 xxx 8.180 Sunday, May 12, 13
Ұࠣ误ղ Sunday, May 12, 13
1. Rubyଠຫ Node.js, Go Sunday, May 12, 13
2. 买ߋଟత务ثདྷղႊ ੑೳ问题 Sunday, May 12, 13
RubyՄҎ၏౸ ੑೳ ኂ发ߴ 䇖发Ꮘߴ 维护ੑ Sunday, May 12, 13
谢谢 Q&A Sunday, May 12, 13