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.3k
ドライイーストを使わずにパンを焼けるか? 〜天然酵母のパン作りを支える技術〜
mirakui
0
3.2k
関東積みについて/How to build Kanto-stacking
mirakui
0
580
先折りGTRについて/How to build left-GTR transitions
mirakui
3
1k
サービス開発速度に着目したソフトウェアアーキテクチャ/Software architecture for effective service development at Cookpad
mirakui
5
6.8k
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
Vista FinderMx
jtes
0
160
小さな勉強会の始め方、広げ方、あるいは友達の作り方 / How to Start, Grow, and Build Connections with Small Study Groups
ar_tama
3
1.5k
クレジットカードを製造する技術
yutadayo
77
39k
LeSSはスクラムではない!?LeSSにおけるスクラムマスターの振る舞い方とは / Scrum Master Behavior in LeSS
toma_sm
0
150
kube-vipとkube-proxy置き換えCiliumを積んだ究極のK3sクラスタを建てる
logica0419
4
190
AI時代のアジャイル開発(XP祭り2024版) / Agile Development in the AI Era in XPJUG
takaking22
13
3.5k
【shownet.conf_】多様化するネットワーク環境を柔軟に統合するルーティングテクノロジー
shownet
PRO
0
290
Strict Concurrencyにしたらdeinitでクラッシュする話
0si43
0
120
Pythonを活用したLLMによる構造的データ生成の手法と実践
brainpadpr
3
240
業務ヒアリングと知識の呪い
tamai_63
0
140
ガバメントクラウド開発と変化と成長する組織 / Organizational change and growth in developing a government cloud
kazeburo
3
640
Webセキュリティのあるきかた
akiym
14
4.5k
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
30
1.4k
How STYLIGHT went responsive
nonsquared
94
5.1k
Docker and Python
trallard
40
3k
What's in a price? How to price your products and services
michaelherold
243
11k
How GitHub (no longer) Works
holman
311
140k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
279
13k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
44
2k
The Mythical Team-Month
searls
218
43k
Statistics for Hackers
jakevdp
796
220k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
Designing for humans not robots
tammielis
249
25k
Code Review Best Practice
trishagee
62
16k
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 Ͱ
࡞Γ͍ͯ͘͠
·ͱΊ
େલఏʢ࠶ʣ • ࣄۀมԽ͢Δ • ৫มԽ͢Δ • ϓϩμΫτίʔυʹण໋͕͋Δ • ։ൃϦιʔε༗ݶͰ͋Δ
ੜ͖͢ΔࣄۀͷͨΊʹ ٕज़͕Ͱ͖Δ͜ͱ • ࣭৽͠͞Λอͭ͜ͱࣗମΛ ΈԽ͢Δ • खΕʹͳΔલʹগͣͭ͠Δ • ࡉ͔͘ޭମݧΛ࡞ΓɺΞοϓσʔτ ͷՁΛ৫ʹ࣮ײͤ͞Δ