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
Technical Successes and Failures in the History...
Search
Issei Naruta
January 23, 2016
Technology
45
37k
Technical Successes and Failures in the History of Cookpad Development
2016/01/23 Cookpad TechConf 2016
http://techconf.cookpad.com/
Issei Naruta
January 23, 2016
Tweet
Share
More Decks by Issei Naruta
See All by Issei Naruta
データパイプラインをなんとかした話 / Improving the Data Pipeline in IVRy
mirakui
1
350
Cookpad TechConf 2022 Keynote
mirakui
0
3.4k
ドライイーストを使わずにパンを焼けるか? 〜天然酵母のパン作りを支える技術〜
mirakui
0
3.2k
関東積みについて/How to build Kanto-stacking
mirakui
0
620
先折りGTRについて/How to build left-GTR transitions
mirakui
3
1k
サービス開発速度に着目したソフトウェアアーキテクチャ/Software architecture for effective service development at Cookpad
mirakui
5
6.9k
Beyond the Boundaries
mirakui
1
1.3k
Cookpad Under a Microscope
mirakui
6
8.5k
Developer Productivity in Cookpad
mirakui
174
42k
Other Decks in Technology
See All in Technology
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
450
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
480
【re:Invent 2024 アプデ】 Prompt Routing の紹介
champ
0
140
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
160
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
160
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
120
多領域インシデントマネジメントへの挑戦:ハードウェアとソフトウェアの融合が生む課題/Challenge to multidisciplinary incident management: Issues created by the fusion of hardware and software
bitkey
PRO
2
100
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
410
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
150
Snowflake女子会#3 Snowpipeの良さを5分で語るよ
lana2548
0
230
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
310
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
8
7.3k
Featured
See All Featured
Music & Morning Musume
bryan
46
6.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
A designer walks into a library…
pauljervisheath
204
24k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
GitHub's CSS Performance
jonrohan
1030
460k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Transcript
ΫοΫύουͷܧଓతͳ ͷͨΊʹ։ൃͱӡ༻͕ ԿΛ͖ͯͨ͠ͷ͔ɺ ͦͷࣦഊͱޭʹ͍ͭͯ $PPLQBE5FDI$POG ΫοΫύουגࣜձࣾΠϯϑϥετϥΫνϟʔ෦ ాҰੜ
ాҰੜ ͳΔͨ ͍͍ͬͤ !NJSBLVJ ΫοΫύουגࣜձࣾ ΠϯϑϥετϥΫνϟʔ෦ ೖࣾ
େલఏ • ࣄۀมԽ͢Δ • ৫มԽ͢Δ • ϓϩμΫτίʔυʹण໋͕͋Δ • ։ൃϦιʔε༗ݶͰ͋Δ
ࠓͷςʔϚ • ݶΒΕͨϦιʔεͰɺͲ͏ͬͯ ৫ࣄۀͷมԽʹڧ͍։ൃΛߦ͏͔ • ण໋Խͨ͠ΞϓϦέʔγϣϯͱ Ͳ͏͖߹͍͔ͬͯ͘
ྺ࢙
ʮΫοΫύουʯ ͍͔ͭΒ͋Δͷʁ
IUUQTJOGPDPPLQBEDPNDPSQPSBUFIJTUPSZ
IUUQTXFCBSDIJWFPSHXFCIUUQXXXDPPLQBEDPN
IUUQTJOGPDPPLQBEDPNDPSQPSBUFIJTUPSZ
$PME'VTJPO3BJMT
IUUQTJOGPDPPLQBEDPNDPSQPSBUFIJTUPSZ
IUUQTTQFBLFSEFDLDPNB@NBUTVEBUIFSFDJQFGPSUIFXPSMETMBSHFTUSBJMTNPOPMJUI
ෆ໊༪
߃ྫͷSBLFTUBUT ൛ +----------------------+-------+-------+---------+---------+-----+-------+ | Name | Lines | LOC |
Classes | Methods | M/C | LOC/M | +----------------------+-------+-------+---------+---------+-----+-------+ | Controllers | 53487 | 43106 | 578 | 4326 | 7 | 7 | | Helpers | 16467 | 13482 | 19 | 1544 | 81 | 6 | | Models |109238 | 86118 | 1938 | 9700 | 5 | 6 | | Mailers | 2259 | 1821 | 47 | 209 | 4 | 6 | | Workers | 797 | 678 | 23 | 38 | 1 | 15 | | Chanko units | 12737 | 10967 | 20 | 373 | 18 | 27 | | Libraries | 52295 | 43235 | 649 | 3954 | 6 | 8 | | Feature specs | 56569 | 45583 | 0 | 192 | 0 | 235 | | Request specs | 46276 | 39906 | 0 | 18 | 0 | 2215 | | Routing specs | 614 | 495 | 0 | 0 | 0 | 0 | | Controller specs | 64188 | 53000 | 6 | 128 | 21 | 412 | | Helper specs | 84918 | 70300 | 3 | 71 | 23 | 988 | | Model specs |163524 |135337 | 5 | 130 | 26 | 1039 | | Worker specs | 1156 | 959 | 0 | 1 | 0 | 957 | | Chanko unit specs | 9214 | 7596 | 0 | 11 | 0 | 688 | | Library specs | 26054 | 21809 | 25 | 125 | 5 | 172 | +----------------------+-------+-------+---------+---------+-----+-------+ | Total |699793 |574392 | 3313 | 20820 | 6 | 25 | +----------------------+-------+-------+---------+---------+-----+-------+ Code LOC: 199407 Test LOC: 374985 Code to Test Ratio: 1:1.9
Ͱ͔͍ͱԿ͕ى͜Δͷ͔ ىಈʹ͕͔͔࣌ؒΔ ςετʹ͕͔͔࣌ؒΔ ੩తղੳܥπʔϧ͕ಈ͔ͳ͍ ϥΠϒϥϦ͕ಈ͔ͳ͍ σϓϩΠ͕େม ϨʔϧʹΕͳ͍
ίʔυڥͷٺԽ
ͳͥਓ શ෦ॻ͖ͨ͘͠ ͳΔͷ͔
ࠒ શϦχϡʔΞϧܭը
ϦχϡʔΞϧܭը • ΤϯδχΞ10ਓ͘Β͍ • ίʔυ͕ڊେɾෳࡶ͗ͯ͢ɺ৽ػೳͷ࣮͕ࠔ • ͦͦࠓͷαʔϏε͜ΕͰ͍͍ͷͩΖ͏͔ʁ • ίʔυαʔϏεཧతͳঢ়ଶʹͨ͠ɺ Զͨͪͷߟ͑ͨ࠷ߴͷΫοΫύουʹ͠Α͏
w Α͠ϑϧεΫϥονͰॻͧ͘
ϦχϡʔΞϧେࣦഊ
Կ͕ىͬͨ͜ͷ͔ ʮαʔϏεͷίΞόϦϡʔΛநग़͢Δʯ ʮ៉ྷͳίʔυͰΠν͔Βॻ͖͢ʯ ͷ྆ํΛಉ࣌ʹΖ͏ͱͨ͠ ˠ͍ͭ·Ͱܦ࣮͕ͬͯऴΘΒͳ͍
༷ͷཧͱ ϦϑΝΫλϦϯάΛ ಉ࣌ʹΒͳ͍ํ͕͍͍ ֶͼ
खΕʹͳ͔ͬͯΒ Βͳ͍ ֶͼ
ͷ3BJMTҠߦ ͳͥ͏·͍ͬͨ͘ͷ͔ ΤϯδχΞ5ਓ Rails ʹৄ͍ࣾ͠һ 0ਓ ͦΕ΄ͲຊͰྲྀߦͬͯͳ͍
࣌ͷؔऀͷূݴ • αʔϏεͷػೳ͕·ͩগͳ͔ͬͨ • ͢Ͱʹ΅Ζ΅Ζ͔ͩͬͨΒɺ ͦΕҎ্ࣦഊ͠Α͏͕ͳ͔ͬͨ • ͦͦͦΜͳʹޭ͍ͯ͠ͳ͔ͬͨ • ʢҠߦ͕ͨ͠ɺॳ͔ͳΓෆ҆ఆͩͬͨʣ
• ए͔ͬͨ
ͰͲ͏͢Ε͍͍ͷ͔
ຊʹཉ͍͠ͷ Կͩͬͨͷ͔ʁ
ͳͥॻ͖͔ͨͬͨ͠ͷ͔ • αʔϏεͷܧଓతͳվળ͕͔ͨͬͨ͠ • ṖͷෳࡶͳϨΨγʔίʔυ͕ଟ͗ͯ͢ ػೳͷվળՃ͕ࠔ
ϨΨγʔίʔυΛ શ෦ॻ͖͞ͳͯ͘ ։ൃΛམͱͣ͞ ܧଓతͳվળ͕Ͱ͖ΔΑ͏ʹ ͢Ε͍͍ͷͰ
ϦχϡʔΞϧࣦഊ͕ੜΈग़ͨ͠ $IBOLP
$IBOLP ຊ൪ڥͰͷτϥΠ&ΤϥʔΛࢧԉ͢Δ Rails ༻ gem Unit ͱ͍͏୯ҐͰطଘίʔυͷύονΛهड़ IUUQTHJUIVCDPNDPPLQBEDIBOLP
" # طଘͷίʔυ A ΛɺελοϑϢʔβͷΈʹରͯ͠ ϕʔλ൛ͷίʔυ B ʹஔ͖͍͑ͨ ͨͩ͠ɺB ݥతͳ࣮ͳͷͰɺྫ֎͕ൃੜ͢Δ͔͠Εͳ͍
طଘͷ$POUSPMMFSͷίʔυ ϕʔλ൛ͷίʔυ
ελοϑͳΒ# #Ͱྫ֎͕ى͖ͨΒ" ελοϑҎ֎ͳΒ" ϑϥάͰذ͍ͤͯ͘͞ͱίʔυ͕ԚΕ͍ͯ͘
ϕʔλػೳͷ6OJU طଘͷ$POUSPMMFSͷίʔυ " # Chanko ͰɺUnit ͱ͍͏ϑΝΠϧʹϕʔλػೳͷϩδοΫΛهड़͢Δ invoke ݅Λຬͨͨ͠߹ʹɺطଘϩδοΫ (A)
ͷΘΓʹ Unit (B) ͕࣮ߦ͞ΕΔ B ͕ྫ֎Λىͨ͜͠߹ɺݩͷ A ͕࣮ߦ͞ΕΔͨΊɺϢʔβʹΤϥʔ͕ฦΒͳ͍ JOWPLF݅
ແࣄʹՁ͕ೝΊΒΕͨΒ ຊ൪ͷ࣭ͷίʔυʹ্͛Δ طଘίʔυΛॻ͖͑ɺUnit ϑΝΠϧΛফ͢ ʢ௨শ Un-chankoʣ
d ଟαʔϏε࣌
None
ΫοΫύου ຊମίʔυ ผϓϩδΣΫτ 3BJMT
ϓϩδΣΫτͷ͔Εํ • ࠷ॳ͔ΒผϓϩδΣΫτͱͯ͠࡞ΒΕɺ ޙ͔Βຊମͱ࿈ܞͨ͠ύλʔϯ • ࠷ॳຊମͷҰ෦ͱͯ͠࡞ΒΕɺ ޙ͔Βͨ͠ύλʔϯ
8PSME`TMBSHFTU SBJMTNPOPMJUI Λ٫͍ͨ͠
ϓϩδΣΫτׂํ • ৽نαʔϏεΛ࡞Δͱ͖ • ຊମͱີ݁߹ͤ͟ΔΛಘͳ͍ͷຊମͰ࣮ • ͦ͏Ͱͳ͍ͷ࠷ॳ͔ΒผϓϩδΣΫτͰ • طଘαʔϏε •
ׂՄೳͳͷॱׂ͍࣍ͯ͘͠
ʙ αʔϏεͷׂ
IUUQUFDIMJGFDPPLQBEDPNFOUSZ ͱ͍͍ͯهࣄɺ͓͢͢Ί
ʮຊԿ͕͍ͨ͠ͷ͔ʯΛݟۃΊΔ • γϯϓϧͳ࡞Γʹม͍͑ͨ • ෆཁͳίʔυ͕ॏͳΓɺಈ࡞͕͘ͳͬ ͍ͯΔͱ͜ΖΛղফ͍ͨ͠ • ৽͍͠ϥΠϒϥϦɺ৽͍ٕ͠ज़ΛऔΓ ࠐΊΔΑ͏ʹ͍ͨ͠
େࣄͳ͜ͱ ҰͭͣͭΔ
ೋஈ֊ͷΞϓϦέʔγϣϯ 1.ΫοΫύουຊମΛ fork ͠ɺෆཁ෦ Λૈํফͯ͠ςετΛ௨͢ 2.rails new ͨ͠৽نϓϩδΣΫτʹ ࣸܦͯ͠ςετΛ௨͢
ຊମίʔυΛGPSL ෆཁͳ෦Λૈํআ ςετΛ௨͢ ୈஈ֊
͜ͷ࣌Ͱ • ʮ͓͍͍݈͠߁ʯ͚ͩͷςετ࣮ߦɺ σϓϩΠ͕Մೳʹͳͬͨ • ͜Ε͚ͩͰेࣄۀతͳԸܙ͕͋Δ • ফ͖͠Εͳ͔ͬͨґଘϥΠϒϥϦɺ ϞϯΩʔύον͕ଟ͍ͬͯΔঢ়ଶ •
ςετ࣮ߦ͕͔ͬͨΓɺϨʔϧ͔Β ͣΕͨΓ͍ͯ͠Δͷ͕
SBJMTOFXͨ͠৽نίʔυϕʔεʹ ϩδοΫΛҠ২͍͖ͯ͠ɺ طଘͷςετ͕௨Δ͜ͱΛࢦ͢ ୈஈ֊
ҙ • ϩδοΫҠಈ͢Δ͚ͩ • ϦϑΝΫλϦϯάͨ͘͠ͳͬͯ զຫ͢Δ • ςετΛ௨աͤ͞Δ͜ͱʹूத
ʮ͓͍͍݈͠߁ʯޭ͔Βͷֶͼ • ϑϧεΫϥονͰॻ͖͞ͳ͔ͬͨ • ༷มߋϦϑΝΫλϦϯάΛߦΘͣɺ ͚ͩΛߦͬͨ • খنʹগͣͭ͠ਐΊ͍ͯ͘͜ͱͰɺ ͦΕͧΕͷஈ֊ͰࣄۀతͳϝϦοτΛ ڗडͰ͖ͨ
ʹΑΔԸܙ • ΫοΫύουຊମ • ࣄۀͻͱͭίʔυ͕খ͘͞ͳͬͨ • ͓͍͍݈͠߁ • Ϩʔϧʹͬͨී௨ͷ Rails
ΞϓϦέʔγϣϯʹͳΕͨ • ܰྔͰϞμϯͳ։ൃڥʹͳͬͨ
ίʔυ࣭
ίʔυ࣭Ϗδωεʹ Өڹ͢Δ͔ʁ
ΫοΫύουͷ͑ :&4
ίʔυͷ࣭ • Մಡੑ • ϝϯςφϯεੑ • όάͷ༗ແ • ηΩϡϦςΟ
ίʔυͷ࣭͕Өڹ͢Δͷ • ։ൃޮ • ଐਓੑ wίʔυͷण໋
Ͳ͜·ͰΔ͖͔ʁ Γ͗͢ͳ͍ ʮ៉ྷͳίʔυʯΛॻ͘͜ͱࣗମ͕తͰͳ͍ ࣄۀϑΣʔζʹͱͬͯඞཁͳ࣭·ͰΛࢦ͢
ίʔυϨϏϡʔ • ࣭ͷߴ͍ίʔυϨϏϡʔ͕ίʔυ࣭ Λ͋Δఔ୲อ͢Δ • ෛͷҨ࢈Λ͠ʹ͘͘ͳΔ
ίʔυϨϏϡʔΞϯνύλʔϯ • ࠣࡉͳจ๏ͷΈͰᎍΊΔ • ΠϯσϯτɺׅހͳͲ • ͱʹ͔͘ෆໟ
ίʔυن͕͋Δͱ ίʔυϨϏϡʔͷޮ͕ ྑ͘ͳΔ ֶͼ
IUUQTHJUIVCDPNDPPLQBETUZMFHVJEF
None
ಛ ͦΜͳΜͲͬͪͰ͍͍ͩΖͱ ͍͏ͷ݁ߏܾΊͯΔ
͘Β͍ӡ༻ͯ͠Έͯ • ࠷ॳରҙݟଟ͔ͬͨʢʣ • ϏδωεͷίʔυϨϏϡʔͳͷʹจ๏ ͷ͠ΐ͏ͳ͍૪͕ల։͞ΕΔɺ Έ͍ͨͳͷΛݟ͔͚ͳ͘ͳͬͨ • จ๏ͷ૪ελΠϧΨΠυͷํͰ ΕΑ͍
• ͋ͬͯΑ͔ͬͨελΠϧΨΠυ
ΠϯϑϥͷٺԽ
%$"84
&$$MBTTJD71$
ೋͷʮશ࡞Γ͠ʯΛܦͯ • ׂͷΑ͘Θ͔Βͳ͍ Ṗͷαʔό͕౫ଡ͞Εͨ • શαʔό͕ Infra as Code Խ͞Εͨ
• Ͳ͘͞͞Ͱ OS ֤छύοέʔδ͕ ΞοϓσʔτͰ͖ͨ
ΠϯϑϥٺԽ • ͢Ͱʹଘࡏ͠ͳ͍αʔόͷ Puppet • OS ϛυϧΣΞ͕ݹ͍·· • ڥ͕ݹͯ͘ੈ͔ؒΒִ͞ΕΔ
ΠϯϑϥٺԽͷಛ • ಈ͍͍ͯ͑͞ΕɺΞϓϦέʔγϣϯ ίʔυ΄ͲٺԽ͕ʹ ͳΓʹ͍͘ • େ෯ͳόʔδϣϯΞοϓେม͔ͭ࣌ ͕͔͔ؒΔͷͰɺඞཁʹͳ͔ͬͯΒ ಈ͖࢝ΊΔͷͰ͍
ࣜભٶ IUUQTKBXJLJQFEJBPSHXJLJਆٶࣜભٶ
ࣜભٶ ਆٶࣜભٶɺਆٶʢҏਆٶʣʹ͓͍ͯߦΘΕΔࣜભ ٶʢఆظతʹߦΘΕΔભٶʣͰ͋Δɻ ਆٶͰɺݪଇͱͯ͠20͝ͱʹɺٶʢߖେਆٶʣɾ֎ٶ ʢ๛डେਆٶʣͷೋͭͷਖ਼ٶͷਖ਼఼ɺ14ͷผٶͷશͯͷ఼ࣾ ΛΓସ͑ͯਆ࠲Λભ͢ɻ IUUQTKBXJLJQFEJBPSHXJLJਆٶࣜભٶ
ࣜભٶͷ͕͍͜͜͢͝ • ༻ͷ͍ݐஙํࣜͳͷʹ ҏਆٶ͓Αͦ1300ଘࡏ͍ͯ͠Δ • 7ੈلͷੜݐஙͷٕज़͕ݱͰ ঝ͞Ε͍ͯΔ • ભٶͷ༻ࡐͱͳΔΛҭͯΔͷʹ 200Ҏ্͔͔Δ
࡞Γ͢͜ͱΛ લఏʹ͢Δ͜ͱͰ ण໋Խ ֶͼ
None
*OGSB*OGSB • CentOS 6.2 -> Ubuntu 14.04 (16.04) • Puppet
-> Itamae • VPCωοτϫʔΫͷ࠶ઃܭ • ֤छύοέʔδɺϛυϧΣΞͷ όʔδϣϯΞοϓ • ͦͷଞϨΨγʔͷ৽
Πϯϑϥࣜભٶ • ৽͘͠࡞Δαʔό infra2 Ͱ ϓϩϏδϣχϯά͢Δ • طଘͷαʔόগͣͭ͠ infra2 Ͱ
࡞Γ͍ͯ͘͠
·ͱΊ
େલఏʢ࠶ʣ • ࣄۀมԽ͢Δ • ৫มԽ͢Δ • ϓϩμΫτίʔυʹण໋͕͋Δ • ։ൃϦιʔε༗ݶͰ͋Δ
ੜ͖͢ΔࣄۀͷͨΊʹ ٕज़͕Ͱ͖Δ͜ͱ • ࣭৽͠͞Λอͭ͜ͱࣗମΛ ΈԽ͢Δ • खΕʹͳΔલʹগͣͭ͠Δ • ࡉ͔͘ޭମݧΛ࡞ΓɺΞοϓσʔτ ͷՁΛ৫ʹ࣮ײͤ͞Δ