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
160
Find and Replace Code based on AST
flyerhzm
0
230
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
Jetpack Composeで始めるServer Cache State
ogaclejapan
2
160
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
1
110
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
280
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
370
Password-less Journey - パスキーへの移行を見据えたユーザーの準備 @ AXIES 2024
ritou
3
1.4k
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
2
2.1k
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.2k
5分でわかるDuckDB
chanyou0311
10
3.2k
Qiita埋め込み用スライド
naoki_0531
0
860
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
150
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
2
250
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
Fireside Chat
paigeccino
34
3.1k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Visualization
eitanlees
146
15k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Optimizing for Happiness
mojombo
376
70k
Become a Pro
speakerdeck
PRO
26
5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Designing for humans not robots
tammielis
250
25k
GraphQLとの向き合い方2022年版
quramy
44
13k
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