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
240
Rails Performance Tips
flyerhzm
0
1.2k
Refactor ruby code based on AST
flyerhzm
4
3.6k
基于AST的代码优化
flyerhzm
10
800
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
実践! ソフトウェアエンジニアリングの価値の計測 ── Effort、Output、Outcome、Impact
nomuson
0
2.1k
30分でわかる「リスクから学ぶKubernetesコンテナセキュリティ」/30min-k8s-container-sec
mochizuki875
3
450
新卒1年目、はじめてのアプリケーションサーバー【IBM WebSphere Liberty】
ktgrryt
0
130
生成AI × 旅行 LLMを活用した旅行プラン生成・チャットボット
kominet_ava
0
160
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
55k
デジタルアイデンティティ人材育成推進ワーキンググループ 翻訳サブワーキンググループ 活動報告 / 20250114-OIDF-J-EduWG-TranslationSWG
oidfj
0
540
FODにおけるホーム画面編成のレコメンド
watarukudo
PRO
2
280
My small contributions - Fujiwara Tech Conference 2025
ijin
0
1.5k
DMMブックスへのTipKit導入
ttyi2
1
110
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
360
テストを書かないためのテスト/ Tests for not writing tests
sinsoku
1
170
技術に触れたり、顔を出そう
maruto
1
160
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
173
51k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
210
What's in a price? How to price your products and services
michaelherold
244
12k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
GitHub's CSS Performance
jonrohan
1030
460k
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