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
Cookpad TechConf 2022 Keynote
mirakui
0
3.4k
ドライイーストを使わずにパンを焼けるか? 〜天然酵母のパン作りを支える技術〜
mirakui
0
3.2k
関東積みについて/How to build Kanto-stacking
mirakui
0
600
先折り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.2k
Cookpad Under a Microscope
mirakui
6
8.5k
Developer Productivity in Cookpad
mirakui
174
42k
How We Gain "Mobile First" Using WebP with ImageMagick
mirakui
10
13k
Other Decks in Technology
See All in Technology
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
190
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
0
980
B2B SaaS × AI機能開発 〜テナント分離のパターン解説〜 / B2B SaaS x AI function development - Explanation of tenant separation pattern
oztick139
2
220
SSMRunbook作成の勘所_20241120
koichiotomo
2
120
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
490
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
3
190
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
0
110
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
160
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
240
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
360
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
169
14k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Faster Mobile Websites
deanohume
305
30k
Docker and Python
trallard
40
3.1k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Side Projects
sachag
452
42k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
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 Ͱ
࡞Γ͍ͯ͘͠
·ͱΊ
େલఏʢ࠶ʣ • ࣄۀมԽ͢Δ • ৫มԽ͢Δ • ϓϩμΫτίʔυʹण໋͕͋Δ • ։ൃϦιʔε༗ݶͰ͋Δ
ੜ͖͢ΔࣄۀͷͨΊʹ ٕज़͕Ͱ͖Δ͜ͱ • ࣭৽͠͞Λอͭ͜ͱࣗମΛ ΈԽ͢Δ • खΕʹͳΔલʹগͣͭ͠Δ • ࡉ͔͘ޭମݧΛ࡞ΓɺΞοϓσʔτ ͷՁΛ৫ʹ࣮ײͤ͞Δ