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
巨大化したモノリスApplicationの安全なRubyバージョンアップ🚀
Search
Takashi Miyahara
October 30, 2019
Programming
4
8k
巨大化したモノリスApplicationの安全なRubyバージョンアップ🚀
Meetup for Rails engineers -メドピア×リンカーズ×Classi開発事例-にて発表した資料です。
https://connpass.com/event/150554/
Takashi Miyahara
October 30, 2019
Tweet
Share
More Decks by Takashi Miyahara
See All by Takashi Miyahara
プルリク毎の検証環境を建てよう
takashimiyahara
0
5k
Image processing tips using ruby-vips
takashimiyahara
0
10k
Other Decks in Programming
See All in Programming
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
690
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
130
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Ruby is Unlike a Banana
tanoku
97
11k
Building Your Own Lightsaber
phodgson
103
6.1k
Making Projects Easy
brettharned
115
5.9k
A better future with KSS
kneath
238
17k
Six Lessons from altMBA
skipperchong
27
3.5k
The Cult of Friendly URLs
andyhume
78
6k
Facilitating Awesome Meetings
lara
50
6.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Speed Design
sergeychernyshev
25
620
Transcript
ڊେԽͨ͠ϞϊϦε Applicationͷ҆શͳRuby όʔδϣϯΞοϓ Takashi, Miyahara MedPeer, Inc. DCP Division, Platform
Development Group. 2019/10/30 Meetup for Rails engineers
ࣗݾհ Nameɿٶݪ ਸࢤ(@TakashiMiyahara) Jobɿҩࢣઐ༻ίϛϡχςΟαΠτ ʮMedPeerʯͷ։ൃ Hobbyɿࣗ࡞ΩʔϘʔυ One ThingɿॳొஃͰ͢ʂʂ
ձࣾհ
ձࣾհ
ձࣾհ
ձࣾհ
None
None
! όʔδϣϯΞοϓͷखॱ 1. ։ൃڥΛRuby2.6Խɺ֤छهड़Λमਖ਼ 2. ECSͷΠϝʔδΛϏϧυˍΞοϓϩʔυ 3. खݩɾCIʹͯಈ࡞֬ೝˍςετ 4. stagingڥʹө͠ɺಈ࡞ݕূ
5. productionڥʹө
! όʔδϣϯΞοϓ։࢝ ʮRubyͷόʔδϣϯΞοϓؤுΔͧͬ ! ʯ
! खݩɾCIʹͯಈ࡞֬ೝˍςετ ʮϩʔΧϧɾCIڥͰςετશ෦ύε͠ ͨͧʂ ! ʯ
! 8݄ CI͕ίέͨʂʂ
None
! 8݄ ʮͨ·ʹམͪΔςετ͔ͳʁʯ CIʮReceived 'killed' signalʯ ʮ....ʯ
! 8݄
None
! 8݄ ݪҼͷίʔυΛൃݟ
! Durationͷόά Range#stepʹ ActiveSupport::DurationΛ͍ͯ͠Δ ෦Ͱɺੑೳ͕ेഒʙඦഒʹѱԽ Rubyɿ2.6.3, 2.6.4, 2.6.5 Railsɿ5.2.3 ActiveSupportɿ5.2.3
! ࠶ݱͤ͞ΔͨΊͷ࠷খͷίʔυ
! Rubyຖͷ࣮ߦͷ֬ೝ Ruby 2.5.3 Ruby 2.6.3 2.1e-05 s 11.550944 s
ʮRuby 2.6Λ͏ͱѹతʹ͘ͳΔ ͳ͊...ʯ
! Range#stepͷݕূ
None
! ࣮ߦ݁Ռ Ruby2.6ܥͱRails5.2ܥͷΈ߹ΘͤͰɺ ύϑΥʔϚϯε͕ѹతʹѱԽ͠·͢
! όάͷݪҼ Ruby 2.6͔Βrange.step(n)͕ Enumerator::ArithmeticSequenceΛ ฦ͢Α͏ʹͳͬͨ → ҙਤ͠ͳ͍σʔλߏʹมԽ → DurationͷՃࢉܭࢉྔ͕ϧʔϓؔʹ
ରͯ͠ࢦؔతʹ૿Ճ
! όάͷݱঢ় Rails6Ͱमਖ਼͞Ε͍ͯΔΑ͏Ͱ͢
! όάͷमਖ਼ํ๏
! ͬͨʂ
None
! 9݄
! 9݄
None
! 9݄ ʮBatchαʔόʔΛ҆શʹ࠶ىಈ͠ͳ͍ ͱɺJobΛਖ਼࣮͘͠ߦͰ͖ͳ͍ͧ...ʯ
! Sidekiq Jobͷ҆શͳ࠶ىಈ 1. ࣮ߦதͷJobΛ࣮ͯ͢ߦ͖ͤ͞Δ 2. Sidekiqͷleaderϓϩηε্ཱ͕͕ͪΒͳ ͤ͘͞Δ 3. SidekiqͷleaderϓϩηεΛఀࢭ
4. Masterϓϩηε͔ΒleaderϓϩηεΛى ಈ
! ಈ͍͍ͯΔJobΛ֬ೝ
! Sidekiqͷleaderϓϩηε্ཱ͕͕ͪΒͳ ͤ͘͞Δ
! Sidekiq Jobͷঢ়ଶΛࢹ
! SidekiqͷleaderϓϩηεΛఀࢭ
! SidekiqͷleaderϓϩηεΛఀࢭˠىಈ
! Sidekiqͷঢ়ଶΛ֬ೝ
! Batchαʔόʔͷ҆શͳ࠶ىಈ͕֬ೝͰ͖ ͨʂ
None
! productionڥʹө
! medpeer.jpͷRubyόʔδϣϯΞοϓΛ࣮ ࢪʂ 201910݄15ʢՐʣʹόʔδϣϯΞοϓ ྃ
None