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.2k
Paging in API
r7kamura
3
8.6k
Chanko Hacking Guide
r7kamura
5
1.3k
Making things with something small
r7kamura
1
460
Hidden
r7kamura
0
76
Butsukari Geiko
r7kamura
10
36k
Casual CI Server
r7kamura
7
1.8k
Other Decks in Programming
See All in Programming
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
770
Beyond ORM
77web
11
1.6k
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.2k
ドメインイベント増えすぎ問題
h0r15h0
2
560
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
560
サーバーゆる勉強会 DBMS の仕組み編
kj455
1
300
php-conference-japan-2024
tasuku43
0
430
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
240
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1k
良いユニットテストを書こう
mototakatsu
11
3.5k
はてなにおけるfujiwara-wareの活用やecspressoのCI/CD構成 / Fujiwara Tech Conference 2025
cohalz
2
2.5k
Amazon Nova Reelの可能性
hideg
0
180
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Navigating Team Friction
lara
183
15k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Unsuck your backbone
ammeep
669
57k
Optimizing for Happiness
mojombo
376
70k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
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