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
個人開発のやっていき方
Search
r7kamura
July 20, 2017
Programming
94
23k
個人開発のやっていき方
2017年7月20日に行われた Rails Developers Meetup #3 の発表資料です。
r7kamura
July 20, 2017
Tweet
Share
More Decks by r7kamura
See All by r7kamura
Railsアップグレード百景
r7kamura
11
6.5k
amakanにおける書籍のシリーズ判定方法について 2016-08-21
r7kamura
10
6k
Tenkaichi Bot Butoukai
r7kamura
11
5.1k
Paging in API
r7kamura
3
8.6k
Chanko Hacking Guide
r7kamura
5
1.2k
Making things with something small
r7kamura
1
460
Hidden
r7kamura
0
73
Butsukari Geiko
r7kamura
10
36k
Casual CI Server
r7kamura
7
1.8k
Other Decks in Programming
See All in Programming
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
Jakarta EE meets AI
ivargrimstad
0
610
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
CSC509 Lecture 11
javiergs
PRO
0
180
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
Click-free releases & the making of a CLI app
oheyadam
2
120
イベント駆動で成長して委員会
happymana
1
320
CSC509 Lecture 09
javiergs
PRO
0
140
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
C++でシェーダを書く
fadis
6
4.1k
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
Featured
See All Featured
RailsConf 2023
tenderlove
29
900
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Gamification - CAS2011
davidbonilla
80
5k
Six Lessons from altMBA
skipperchong
27
3.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Bash Introduction
62gerente
608
210k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Faster Mobile Websites
deanohume
305
30k
Code Review Best Practice
trishagee
64
17k
Making Projects Easy
brettharned
115
5.9k
Transcript
ݸਓ։ൃͷ͍͖͔ͬͯͨ @r7kamura
ࣗݾհ • Ryo Nakamura • https://github.com/r7kamura • https://twitter.com/r7kamura • Cookpad→Increments→ϑϦʔϥϯε
• Railsͷࣄͱ͔୳ͯ͠·͢
ࠓ͢͜ͱ • Կͭͬͨ͘Β͍͍ͷ͔ • ਓखෆ • ۀͱͷؔΘΓํ • OSSʹ͢Δ͔Ͳ͏͔ •
๏ͱܦཧ • ࣦഊࣄྫ • ΤλΒͳ͍ͨΊʹ
Կͭͬͨ͘Β͍͍ͷ͔
Կͭͬͨ͘Β͍͍ͷ͔ (1/2) • Hello, world!! ͷ͜͏ଆʹਐΊͳ͍ • Կ͔ͭ͘Δͧͱߟ͑ͨͱ͖ʹ·ͣ͜ΕͰࠔΔ • ղ͖͘ΛઃఆͰ͖ͳ͍ͱ͍͏
• దͳΛݟ͚ͭΔͷ͕Ұ൪͍͠…
Կͭͬͨ͘Β͍͍ͷ͔ (2/2) • →ࠜݯతͳཉٻʹࣖΛ͚Δͱྑ͍ • ࣗͷΛղܾͰ͖Δͷ͕ྑ͍ • খ࢝͘͞ΊΒΕΔͱྑ͍ • ͘ଓ͚ΒΕΔͱྑ͍
• ์ஔͰ͖Δͷ͕ྑ͍ • ऩೖΛಘΒΕΔͱͳ͓ྑ͍
amakan.net ͷ߹ • ແݶʹອըಡΈ͍ͨ… • →ອըͷແݶϦετ͕ཉ͍͠… • →͕ࣗ͡ΌͿ͡ΌͿߪೖͨ͘͠ͳΔΑ͏ͳɺࣹ৺Λ ἤΓ·͘Δ৽ץϦετ͕… •
→AmazonͷAPIͰΰχϣΰχϣΕ͍͚ͦ͏ • →ऩೖͰແݶʹອըಡΊΔͣ
https://amakan.net/ ಡॻཤྺ৽ץใΛཧ͢ΔαʔϏε
None
None
None
ͱ͍͑ • ͭ͘Γ͍ͨͷ͕ͭ͘ΕΔͱݶΒͳ͍ • ೳྗෆͰ࣮ݱͰ͖ͦ͏ʹͳ͍ͷ͕΄ͱΜͲ • ͭ͘Γ͍ͨͷͱΘΕΔͷͱͷଥڠΛ୳Δ • ඳ͖͍ͨͷͱചΕΔͷ͕ҧ͏ອըՈͷΑ͏ͳ ͷ
• ͭ͘Γ͍ͨͷΛͭ͘ΔͨΊʹݚᮎ͢Δͱྑ͍
ਓखෆ
ਓखෆ (1/2) • ݸਓ։ൃͰਓతϦιʔε͕ಛʹෆ͢Δ • ٳͱ͔ʹยखؒʹΔͷͰ͕࣌ؒແ͍ • 1ਓͰશ෦Δඞཁ͕͋ΔͷͰ͕࣌ؒແ͍
ਓखෆ (2/2) • →పఈతʹޮԽ͢Δ͜ͱͰରॲ • ۀͰ͏ٕज़Λڞ༻͢Δ • ݸਓͰ͑Δٕज़Λ͏৫ʹॴଐ͢Δ • εέʔϧ͢Δٕज़ΛΜͰ͍ͬͯ͘
• ଞϓϩδΣΫτͱ෦Λڞ༻͢Δ
amakan.net ٕज़֓ཁ • JSONRubyͰɺHTMLJavaScriptͰੜ • t2.micro + db.t2.micro + cache.t2.micro
• AWS ECS (Pumaίϯςφ + Sidekiqίϯςφ) • AWSϦιʔεTerraformͰཧ • σϓϩΠɾΤϥʔɾδϣϒ࣮ߦͳͲSlackͰ௨ • The 12-Factor App ʹଇͬͨઃܭ
None
None
None
None
ۀͱͷؔΘΓํ
ۀͱͷؔΘΓํ (1/2) • ۀ৺ͷఈ͔Β͖ͰͬͯΔ༁Ͱͳ͍ • ۀରՁʹ߹͏ಇ͖Λ͢Εྑ͍ • ݸਓ։ൃࣗͰબΜͰ͖ͰͬͯΔ͜ͱ • ͖ͰͬͯΔ͜ͱ͙Β͍ຊؾͰΔ͖
ۀͱͷؔΘΓํ (2/2) • ݸਓ։ൃͰ৭ʑͱಥ͖٧ΊΔΑ͏ʹͳΔ • ݸਓͱۀͱͰٕज़Ϩϕϧ͕ٯసͯ͘͠Δ • ݸਓͰࢼٕͨ͠ज़Λۀʹద༻͢Δܗ • ྫ:
TerraformɺECSɺReactOnRailsɺPumaͳ ͲamakanͰࢼ͔ͯ͠ΒQiitaʹಋೖ͍ͯ͠Δ
OSSʹ͢Δ͔Ͳ͏͔
OSSʹ͢Δ͔Ͳ͏͔ (1/2) • ͭͬͨ͘ΞϓϦΛOSSʹ͢Δ͔Ͳ͏͔ • ެ։/ඇެ։ʹؔΘΒͣಉ͡Α͏ʹॻ͖͘ • ऩӹϞσϧͱอଘ͞ΕΔσʔλ࣍ୈ • ྫ:
ެ։ͭͭ͠༗ྉͰϗεςΟϯά • ྫ: ඇެ։ͰҰ෦ػೳΛOSSԽ
OSSʹ͢Δ͔Ͳ͏͔ (2/2) • amakanͰίΞػೳΛOSSԽͨ͠ • github.com/amakan/amakanize • github.com/amakan/amakankan • ͯ͘͠ΕΔਓ͕ଟͯ݁͘Ռతʹॿ͔ͬͨ
• ਓखෆղফͰ͖ΔՄೳੑ͕͋Δ
๏
ར༻نͷ࡞Γํ • άάΔͱδΣωϨʔλʔ͕ग़ͯ͘Δ (ศར) • ॻ੶: ྑ͍WebαʔϏεΛࢧ͑Δʮར༻نʯͷ࡞Γํ • ࣮ࡍΈΜͳΘΓͱίϐϖ͍ͯ͠Δ •
2લʹॻ͍ͨར༻نΛौ୩ͷͰ͔͍ձࣾʹίϐϖ͞Εͨ • ແྉαʔϏε͔༗ྉαʔϏε͔Ͱগ͠ܗ͕มΘΔ • ۀଶ͕ۙͦ͏ͳͭΛ*ࢀߟ*ʹ͢Δͱྑ͍
ϓϥΠόγʔϙϦγʔ • ར༻نͱҰॹʹͭ͘Ζ͏ • ϒϥβ֦ுొ࣌ͳͲʹ͋Δͱศར • ࠂϓϩάϥϜར༻ਃͳͲͰ͑Δ
ܦཧ
ࢧग़ • ҰൠతͳWebΞϓϦʹඞཁͳܦඅѲ͓͖ͯ͘͠ • AWSͰ͋ΕجຊEC2, RDS, Elasticache, ELB͋ͨΓ ͕ࢧత •
AWSߴ͍ɺGCPͩͱֹఔͰࡁΉɺVPSͩͱͬ ͱ͍҆ɺΈ͍ͨͳنײͷѲେࣄ • amakanສϢʔβ͙Β͍·Ͱ݄1ສԁͰࣄΓΔ
ऩೖ • amakan1000ϢʔβͰ݄4ສԁఔͷऩೖ • େͷΞϑΟϦΤΠτར͕2%͔Β5%ఔ • αʔϏεͷ༰ࣗମ͕Λѻ͏ͷ͕ϕετ • AdSenseͷؔ࿈ࠂͰऩӹཱͯΔͷͦͦ͜͜ΞΫ ηεͷ͋ΔαʔϏε͡Όͳ͍ͱݫ͍͠…
• ͜ͷลͷࣄΛ͍ͬͯΔͱαʔϏεߟ͑Δͱ͖ʹ༗ར
અ੫ • ։ۀಧΛग़͓ͯ͘͠ͱ੨৭ਃࠂͰ͖Δ • ʹҰ෦ͷେਓୡ͕ᄆ͍͍ͯΔΞϨ • αʔόɺ࡞ۀεϖʔεͳͲΛܦඅʹ • ؒສ͔Βेສઅ੫Ͱ͖ΔՄೳੑ͕͋Δ
։ۀ ํ๏ • 1. ։ۀfreeeͰ࣭߲ΛຒΊΔ • 2. ੜ͞ΕΔPDFΛ༣ૹ͢Δͱྃ • 3.
ઐ༻ͷωοτۜߦޱ࠲Λ࣋ͭͱศར • 4. ઐ༻ͷΫϨΧ͋Δͱͳ͓ྑ͍
ࣦഊࣄྫ
ࣦഊࣄྫ • amakan݄ͷऩೖ 4ສɺࢧग़1ສͩͬͨ • AmazonΞιγΤΠτʹBAN͞Εͨ • վળͯ͠࿈བྷ͕ͨ͠औΓ߹ͬͯ͘Εͣ… • ࢧग़1ສ͚͕ͩͬͨ…
• ͭΒ͍
ࣦഊ͔Βͷֶͼ • نղऍͷՄೳੑ·Ͱߟ͑ͯΑ͘ಡ͏ • ࣦഊ͢ΔͱϞνϕʔγϣϯ͕ۃʹԼ͕Δ • ऩӹ͕ҙ֎ͱϞνϕʔγϣϯʹͳ͍ͬͯͨ • ์ஔͯͯ͠ಈ͘Α͏ʹͳͬͯͯྑ͔ͬͨ •
Ұͭͷऩೖݯʹґଘ͖͢Ͱͳ͍ • Ϟνϕʔγϣϯݸਓ։ൃʹ͓͍ͯ࠷وॏͳࢿݯ
ΤλΒͳ͍ͨΊʹ
ΤλΔ • ΤλʔφϧʢӬԕͷɺՌͯ͠ͳ͍ʣΛಈࢺԽ ͤͨ͞ޠɻπΫϥʔʢRPGπΫʔϧͷϢʔ βʔʣͷؒͰੜ·Εͨɻ࡞ऀ͕ॾൠͷࣄʹ ΑΓ࡞Λ్தͰ์غ͢Δ͜ͱɺ·ͨͦͷ ঢ়ଶΛද͢ɻ
ΤλΒͳ͍ͨΊʹ • ͭ͘ΔҙຯΛࣦ͢ΔͱඞͣΤλͬͯ͠·͏ • ͭ͘ΔҙຯೋͭҎ্͓࣋ͬͯ͘ͷ͕ྑ͍ • ྫ: ࠷৽ͷRailsͷػೳΛࢼ͢ͱͯ͠͏ • ྫ:
స৬׆ಈͷͱ͖ʹ໊ΘΓʹ͏ • ྫ: Podcastͷωλͮ͘Γͱͯ͠͏ • ྫ: രྲྀߦΓΛເݟͯ։ൃΛଓ͚Δ • ์ஔͯ͠ಈ͘Α͏ʹ͓ͯ͘͜͠ͱॏཁ
ࠓͨ͜͠ͱ • Կͭͬͨ͘Β͍͍ͷ͔ • ਓखෆ • ۀͱͷؔΘΓํ • OSSʹ͢Δ͔Ͳ͏͔ •
๏ͱܦཧ • ࣦഊࣄྫ • ΤλΒͳ͍ͨΊʹ
͓ΘΓ ݸਓ։ൃͷ͍͖͔ͬͯͨ @r7kamura