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.2k
构建异步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
220
Rails Performance Tips
flyerhzm
0
1.2k
Refactor ruby code based on AST
flyerhzm
4
3.5k
基于AST的代码优化
flyerhzm
10
780
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
SAP Community and Developer Update
sygyzmundovych
0
350
The Rise of LLMOps
asei
9
2k
SDNという名のデータプレーンプログラミングの歴史
ebiken
PRO
2
200
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
Next.jsとNuxtが混在? iframeでなんとかする!
ypresto
2
1.3k
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
180
OS 標準のデザインシステムを超えて - より柔軟な Flutter テーマ管理 | FlutterKaigi 2024
ronnnnn
1
340
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
200
CDCL による厳密解法を採用した MILP ソルバー
imai448
3
310
SkiaとImpellerについて
moriya0130
0
160
Is Go A Good Language to Build Compilers?
kennethanceyer
0
100
静的解析で実現した効率的なi18n対応の仕組みづくり
minako__ph
2
1.1k
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
GraphQLとの向き合い方2022年版
quramy
43
13k
4 Signs Your Business is Dying
shpigford
180
21k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Building Your Own Lightsaber
phodgson
103
6.1k
Fireside Chat
paigeccino
34
3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Visualization
eitanlees
145
15k
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