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
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
300
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
160
【re:Invent 2024 アプデ】 Prompt Routing の紹介
champ
0
140
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
150
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.2k
非機能品質を作り込むための実践アーキテクチャ
knih
3
980
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
160
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
150
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
120
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
240
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
170
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
840
Featured
See All Featured
Scaling GitHub
holman
458
140k
Building Applications with DynamoDB
mza
91
6.1k
The Cult of Friendly URLs
andyhume
78
6.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
GraphQLとの向き合い方2022年版
quramy
44
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
How GitHub (no longer) Works
holman
311
140k
Music & Morning Musume
bryan
46
6.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
GitHub's CSS Performance
jonrohan
1030
460k
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 Ͱ
࡞Γ͍ͯ͘͠
·ͱΊ
େલఏʢ࠶ʣ • ࣄۀมԽ͢Δ • ৫มԽ͢Δ • ϓϩμΫτίʔυʹण໋͕͋Δ • ։ൃϦιʔε༗ݶͰ͋Δ
ੜ͖͢ΔࣄۀͷͨΊʹ ٕज़͕Ͱ͖Δ͜ͱ • ࣭৽͠͞Λอͭ͜ͱࣗମΛ ΈԽ͢Δ • खΕʹͳΔલʹগͣͭ͠Δ • ࡉ͔͘ޭମݧΛ࡞ΓɺΞοϓσʔτ ͷՁΛ৫ʹ࣮ײͤ͞Δ