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
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
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
Taming you application's environments
salaboy
0
180
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
470
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
240
Engineer Career Talk
lycorp_recruit_jp
0
110
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
200
強いチームと開発生産性
onk
PRO
33
11k
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
490
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.6k
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
180
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Fireside Chat
paigeccino
34
3k
Making Projects Easy
brettharned
115
5.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
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