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
From 'Legacy' to 'Edge' 2014 edition
Search
SHIBATA Hiroshi
April 19, 2014
Technology
6.2k
9
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
From 'Legacy' to 'Edge' 2014 edition
SHIBATA Hiroshi
April 19, 2014
More Decks by SHIBATA Hiroshi
See All by SHIBATA Hiroshi
How to make faster release cycle of Ruby?
hsbt
2
6.2k
Ruby の開発を支えるエコシステム
hsbt
4
2.4k
Why is building the Ruby environment hard?
hsbt
6
8.5k
開発環境へのこだわり
hsbt
16
12k
OSS ことはじめ
hsbt
5
1.5k
GMO DevNight 05 在宅勤務開始から2ヶ月でやったこと
hsbt
2
590
Development Environment 2019
hsbt
1
380
How to become the Psychic
hsbt
0
2.1k
Software Development
hsbt
1
6.7k
Other Decks in Technology
See All in Technology
クラウドファンディング版StackChan 3体(4体)をインタラクティブな体験型作品にして展示もした話 / スタックチャンお誕生日会2026
you
PRO
0
190
2026 AI Memory Architecture
nagatsu
0
340
起点・思考・出力で分解する 〜PM業務の自動化設計〜
kazu_kichi_67
1
1.1k
MySQL & MySQL HeatWave Report - June 2026
freshdaz
0
150
AI時代のコスト管理を考えよう〜明日から使える実践AWSノウハウ~
yoshimi0227
0
870
AWS Security Agent といっしょに脅威モデリングをやってみよう
amarelo_n24
1
210
週末にループ・エンジニアリングの理解を深めるためのスライド
nagatsu
0
350
2026年6月23日 Syncable Tech + Start Python Club にて
hamukazu
0
150
LayerX コーポレートエンジニアリング室におけるサプライチェーンセキュリティへの取り組み / Supply Chain Security at LayerX Corporate Engineering
yuyatakeyama
3
840
時期が悪い!それでもRaspberry Piを買って遊んで活用するには / 20260627-osc26do-rpi-jikigawarui
akkiesoft
0
840
AIチャットの改善から見えた、良いAI体験とは / What Constitutes a Good AI Experience: Insights from Improving AI Chat
kubode
0
120
ロボティクスの技術 / Robotics Technology
ks91
PRO
0
130
Featured
See All Featured
HDC tutorial
michielstock
2
720
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
220
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
55k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
GraphQLとの向き合い方2022年版
quramy
50
15k
Everyday Curiosity
cassininazir
0
240
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
BBQ
matthewcrist
89
10k
The Cult of Friendly URLs
andyhume
79
6.9k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
590
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
400
Transcript
! From ‘Legacy' to ‘Edge' 2014 edition ! Hiroshi SHIBATA
@hsbt OedoRubyKaigi04
SHIBATA Hiroshi(@hsbt)
asakusa.rb
ruby-lang.org
Rails Girls in Japan
Ruby Committer
None
ϛυϧΣΞͷΞοϓάϨʔυ ࣾ։ൃج൫ͷߏங ౷ܭج൫ͷߏங +409ͷӡ༻උ HJUIVC ηΩϡϦςΟࠪ ίʔυϨϏϡʔ ςετج൫ͷߏங ΞΫηεղੳج൫ͷߏங ։ൃϓϩηε
৽ਓڭҭ ݪߘࣥච ΧϯϑΝϨϯεൃද 044։ൃ αʔόʔߏཧͷ৽ ϦʔϯελʔτΞοϓ +FOLJOT 3VCZ3BJMT 3%#.4 ٕज़ج൫νʔϜ
http://30d.jp
from 2007/5
380,000 users 230,000,000 photos
Our Rails app 46 models 5000 lines in controllers 400
lines in routes.rb 1:1.3 code to test ratio
system architecture
application server
storage server
job server
transaction server
storage is over 450 TB
database size is over 250 GB
Development Culture
จࣈ github workflow
IRC github issue costomer’s contact nagios
DevOps
4 deploy/day
None
How to migrate edge rails from legacy rails?
Ruby 1.8.6 Rails 2.0.2
Ruby 1.8.6 Rails 2.0.2 Ruby 2.1.1 Rails 4.1.0 new!
Why?
None
Ruby on Rails
Ruby 1.8.6 1.8.7 1.9.3 2.0.0 2.1 Rails 2.0/2.1 2.3 3.0
3.2 4.0
Ruby 1.8.6 1.8.7 1.9.3 2.0.0 2.1 Rails 2.0/2.1 2.3 3.0
3.2 4.0 Slow Fast
Ruby 1.8.6 1.8.7 1.9.3 2.0.0 2.1 Rails 2.0/2.1 2.3 3.0
3.2 4.0
Ruby 1.8.6 1.8.7 1.9.3 2.0.0 2.1 Rails 2.0/2.1 2.3 3.0
3.2 4.0
Ruby 1.8.6 1.8.7 1.9.3 2.0.0 2.1 Rails 2.0/2.1 2.3 3.0
3.2 4.0
Rails 2.0 Rails 2.3
Rails 2.0 Rails 2.3 hotfix A migration A
Rails 2.0 Rails 2.3 hotfix A migration A
Rails 2.0 Rails 2.3 hotfix A migration A
จࣈ
Zero Downtime Deploy
cookpad/kage
Kage (kah-geh) is an HTTP shadow proxy server that sits
between clients and your server(s) to enable "shadow requests".
the basic of kage real request
None
_ਓਓ ਓਓ__ਓਓ ਓਓ_! > ಥવͷαʔόʔ࠶ىಈ <! ʉY^Y^Y^YY^Y^Y^YY^Y
Ruby 1.8.6 1.8.7 1.9.3 2.0.0 2.1 Rails 2.0/2.1 2.3 3.0
3.2 4.0
rails 2.3 with bundler
source 'https://rubygems.org'! ! gem 'rails', '~> 2.3.18'! gem 'rake', '~>
0.9.2'! gem 'rdoc'! gem 'rake-confirm'! ! gem 'mysql'! gem "mysql_retry_lost_connection"! gem 'acts_as_paranoid', :github => 'paperboy-30days/acts_as_paranoid'! gem 'passenger', '~> 3.0'! gem 'memcache-client', :require => 'memcache'! gem 'system_timer'! gem 'yajl-ruby', :require => 'yajl'! gem 'will_paginate', '~> 2.3'! gem 'mail'! ! gem 'sass'! gem 'compass-rails'! ! gem 'osaipo_client', :git => '
[email protected]
:paperboy-all/ osaipo_client.git', :branch => 'legacy'! gem 'jugem_client', :git => '
[email protected]
:paperboy-all/ jugem_client.git'! gem 'ppb_footer', :github => 'paperboy-all/ppb_footer'!
require "./config/environment"! ! use Rails::Rack::LogTailer! use Rails::Rack::Static! run ActionController::Dispatcher.new rack
with rails 2.3
30days-front can’t use hyphen can’t use number can’t convert !
application.rb...
Reduce customer frustration.
app1 app2 backgroundrb to dj
จࣈ
Ruby 1.8.6 1.8.7 1.9.3 2.0.0 2.1 Rails 2.0/2.1 2.3 3.0
3.2 4.0
Use trunk everyday.
จࣈ
จࣈ
Use modern architecture
app1 app2
kyoto tycoon is slower than mysql…
None
1.8 to 2.0
จࣈ
2.0 to 2.1
CPU Usage(%) 0 25 50 75 100 49 69 2.0
2.1
Resp. time(ms) 0 50 100 150 200 250 189 221
2.0 2.1
memory usage(giga byte) 0 1 2 3 4 3.8 3.2
2.0 2.1
จࣈ https://www.ruby-lang.org/en/news/2014/03/10/regression-of-hash-reject-in-ruby-2-1-1/
Ruby 1.8.6 1.8.7 1.9.3 2.0.0 2.1 Rails 2.0/2.1 2.3 3.0
3.2 4.0
จࣈ
Resp. time(ms) 0 60 120 180 240 300 287 189
3.2 4.0
Ruby 1.9.3 2.0.0 2.1 2.2 Rails 3.0 3.2 ? 4.0
? 4.1 ?
Ruby 1.9.3 2.0.0 2.1 2.2 Rails 3.0 3.2 ? 4.0
? 4.1 ? New!!
จࣈ
1. Flash structure changes 2. Mutator methods called on Relation
จࣈ
Resp. time(ms) 0 60 120 180 240 300 266 287
4.0 4.1
Ruby 1.9.3 2.0.0 2.1 2.2 Rails 3.0 3.2 ? 4.0
? 4.1 ?
class Bar! def bar(foo = foo())! foo! end! ! def
buzz(foo = foo)! foo! end! ! def foo! :buzz! end! end! ! p Bar.new.bar! p Bar.new.buzz
% ruby -v r45272.rb! ruby 2.2.0dev (2014-04-13 trunk 45580) [x86_64-darwin13]!
:buzz! nil! ! % ruby -v r45272.rb! ruby 2.1.2p80 (2014-03-01 revision 45231) [x86_64-darwin13.0]! :buzz! :buzz
จࣈ
conclusion
2. fix gem 4. fix Ruby 3. fix Rails 1.
fix your code