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 Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
180
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
130
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
150
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
3
220
組織成長を加速させるオンボーディングの取り組み
sudoakiy
2
170
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
アジャイルでの品質の進化 Agile in Motion vol.1/20241118 Hiroyuki Sato
shift_evolve
0
170
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
520
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
いざ、BSC討伐の旅
nikinusu
2
780
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Unsuck your backbone
ammeep
668
57k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
A better future with KSS
kneath
238
17k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Docker and Python
trallard
40
3.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
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 Ͱ
࡞Γ͍ͯ͘͠
·ͱΊ
େલఏʢ࠶ʣ • ࣄۀมԽ͢Δ • ৫มԽ͢Δ • ϓϩμΫτίʔυʹण໋͕͋Δ • ։ൃϦιʔε༗ݶͰ͋Δ
ੜ͖͢ΔࣄۀͷͨΊʹ ٕज़͕Ͱ͖Δ͜ͱ • ࣭৽͠͞Λอͭ͜ͱࣗମΛ ΈԽ͢Δ • खΕʹͳΔલʹগͣͭ͠Δ • ࡉ͔͘ޭମݧΛ࡞ΓɺΞοϓσʔτ ͷՁΛ৫ʹ࣮ײͤ͞Δ