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
Heroku を利用した Quipper の開発事例紹介
Search
Kensuke Nagae
November 29, 2013
Programming
11
3.2k
Heroku を利用した Quipper の開発事例紹介
Tech Compass Vol.6 “Love Heroku?” の発表資料です
http://techcompass.jp/study/06/
Kensuke Nagae
November 29, 2013
Tweet
Share
More Decks by Kensuke Nagae
See All by Kensuke Nagae
スタディサプリ開発チームのこれまでとこれから / StudySapuri Product Meetup #1
kyanny
0
2.3k
Tokyo Web Dev hiring discussion session
kyanny
0
12k
sbpayment.rbのご紹介
kyanny
0
1.9k
#AsiaDevNight
kyanny
0
98
Grape による API 実装 in action
kyanny
7
6.8k
<%= link_to "bundle", "update" %> - Make "bundle update" more fun to review
kyanny
2
4.8k
Web Developer Seminar
kyanny
0
1.7k
Continuous gem dependency updating with Jenkins and Pull Request
kyanny
9
3.1k
Introducing nonopaste-cli #rubyconftw2012
kyanny
1
1.5k
Other Decks in Programming
See All in Programming
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.4k
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
190
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
330
CSC509 Lecture 12
javiergs
PRO
0
160
役立つログに取り組もう
irof
28
9.6k
Better Code Design in PHP
afilina
PRO
0
120
最新TCAキャッチアップ
0si43
0
140
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
Featured
See All Featured
Faster Mobile Websites
deanohume
305
30k
Rails Girls Zürich Keynote
gr2m
94
13k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
A Philosophy of Restraint
colly
203
16k
The Language of Interfaces
destraynor
154
24k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Making Projects Easy
brettharned
115
5.9k
Gamification - CAS2011
davidbonilla
80
5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
860
What's new in Ruby 2.0
geeforr
343
31k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Bash Introduction
62gerente
608
210k
Transcript
)FSPLVΛར༻ͨ͠ 2VJQQFSͷ։ൃࣄྫհ 5FDI$PNQBTTl-PWF)FSPLV z /PWFNCFS ,FOTVLF/BHBF!LZBOOZ
w2VJQQFSͷհ w2VJQQFSϓϥοτϑΥʔϜͰͷ )FSPLVͷ׆༻ࣄྫհ w)FSPLVͷ͍Ͳ͜ΖΛݟۃΊΔ w·ͱΊ ຊͷΞδΣϯμ
!LZBOOZ͕͓ૹΓ͠·͢ wӬ݈հ /BHBF,FOTVLF w݄d2VJQQFS w8FC%FWFMPQFS 3VCZ IUUQLZBOOZNF
2VJQQFSɺϞόΠϧྖҬͷ ֶशϓϥοτϑΥʔϜΛఏڙ͍ͯ͠Δ ڭҭܥελʔτΞοϓاۀͰ͢ IUUQXXXRVJQQFSDPNKBQBODBSFFST
ຊࣾϩϯυϯͰ͕͢౦ژΦϑΟε͋Γ·͢ χϡʔϤʔΫʹελοϑ͕ৗற͍ͯ͠·͢ ৬छʹΑͬͯϩϯυϯɾΞδΞॾࠃͷग़ு
IUUQHBLVNPTUVEZDPN தߴੜֶ͚शαʔϏεʮ(",6.0ʯ
IUUQXXXRVJQQFSTDIPPMDPN ΞδΞֶ͚शαʔϏεʮ2VJQQFS4DIPPMʯ
$SFBUJPO$FOUFS ίϯςϯπΛ࡞Δ 2-JOL ֶशঢ়گΛ Ϟχλʔ͢Δ 2-FBSO (",6.0 ֶश͢Δ 2VJQQFSϓϥοτϑΥʔϜࡾͭͷػೳΛ࣠ʹ ֤छαʔϏεΛల։͍ͯ͠·͢
ಉ͡ΞϓϦέʔγϣϯΛ ผʑͷϒϥϯυͰల։͢Δ͜ͱ͋Γ·͢
ΞϓϦέʔγϣϯͷಈ࡞֬ೝͷͨΊʹ ςετ༻ͷڥඞཁͰ͢Ͷ 5FTUJOH 5FTUJOH
ɾɾɾ͞ΒʹσϓϩΠલͷ࠷ऴνΣοΫ༻ʹ εςʔδϯάڥ༻ҙ͠ͳ͍ͱ 5FTUJOH 5FTUJOH 4UBHJOH 4UBHJOH
Ӧۀͷਓ ʮ͋ɺ͓٬͞ΜʹݟͤΔσϞແ͍ͷʁʯ 5FTUJOH 5FTUJOH 4UBHJOH 4UBHJOH %FNP %FNP
5FTUJOH 5FTUJOH 4UBHJOH 4UBHJOH %FNP %FNP αʔόʔ͕͍ͭ͋ͬͯ͘Γͳ͍Αʂ ͍͍ͪͪηοτΞοϓͯ͠ΒΕͳ͍Αʂ ͜Μͳʹͨ͘͞ΜཧͰ͖ͳ͍Αʂ
)FSPLVΛ͍·͠ΐ͏
ͯ͢)FSPLVͰӡ༻ͯ͠·͢
wαʔόʔͷηοτΞοϓ࡞ۀ͕ෆཁ wΞϓϦέʔγϣϯͷઃఆ࡞ۀ͕؆୯ wαʔόʔͷࢮ׆ࢹ͕ෆཁ wαʔόʔͷεέʔϧΞτ͕؆୯ w๛ͳΞυΦϯͰ֦ு؆୯ )FSPLVͷڧΈ ʮӡ༻ͷෛ୲͕গͳ͍ʯʹ͋Γ·͢
IFSPLVDSFBUF</".&> ηοτΞοϓίϚϯυҰ͚ͭͩ Πϯετʔϧ࡞ۀෆཁͰ͢
HJUQVTIIFSPLVNBTUFS ΞϓϦέʔγϣϯͷσϓϩΠʹ (JUΛ͍·͢
IFSPLVDPOpHTFU,&:7"-6& IFSPLVDPOpH ڥมͷઃఆɾ֬ೝίϚϯυͰ
EJ⒎Va IFSPLVDPOpHBQQNZBQQQSPEVDUJPO a IFSPLVDPOpHBQQNZBQQTUBHJOH 1SP5JQڥมͷࠩνΣοΫ
IFSPLVQTTDBMFXFC εέʔϧΞτίϚϯυҰ͚ͭͩʂ αʔόʔػثͷखɾηοτΞοϓෆཁ ඵͰϦιʔεΛ૿ڧͰ͖·͢
IFSPLVGPSL</&8/".&> ΞϓϦέʔγϣϯͷෳͰ͖·͢ ςετ༻ɾσϞ༻ڥ͙͢࡞Ε·͢
IFSPLVDSFBUFBQQ HJUQVTIIFSPLVNBTUFS IFSPLVGPSLBQQEFNP IFSPLVDPOpHTFU%&.0BQQBQQEFNP σϞ༻ͷڥΛ࡞Δͱͨ͠Β͜Μͳײ͡
๛ͳΞυΦϯ /FX3FMJD ύϑΥʔϚϯεܭଌ
๛ͳΞυΦϯ 4FOE(SJE ϝʔϧ৴
ͦͷଞ͍͔ͭͬͯ͘·͢ w.FNDBDIJFS Ωϟογϡ w3FEJT5P(P ,FZ7BMVFετΞ w)FSPLV4DIFEVMFS DSPO w44-
͋͑ͯΞυΦϯΛΘͳ͍͜ͱ
.POHP-BC .POHP%#ϗεςΟϯά wෳΞϓϦέʔγϣϯ͔Βڞ༗ wݸผܖͷ΄͏͕ྉ͕͍ۚ҆ wΞΫηεݖݶͷదͳ੍ݶ wBEEPOTSFNPWFϛεࢭ
͔͜͜Β۩ମతͳϢʔεέʔεΛ հ͠·͢ wϩάهϛυϧΣΞ w"1*αʔόʔͷϚΠάϨʔγϣϯ w#J[%FW͕1VMM3FRVFTUΛςετ
Ϣʔεέʔε ϩάهϛυϧΣΞ
Ϣʔεέʔε ϩάهϛυϧΣΞ wϦΫΤετɾϨεϙϯεΛͯ͢ه wௐࠪతͰ࣌ؒͷར༻Λఆ w3BDLϛυϧΣΞͱ࣮ͯ͠
Ϣʔεέʔε ϩάهϛυϧΣΞ class LoggingMiddleware def initialize(app) @app = app end
def call(env) ENV['ENABLE_LOGGING'] ? call_with_logging(env) : call_without_logging(env) end def call_with_logging(env) request = Rack::Request.new env status, headers, body = call_without_logging(env) Log.create(request: request, response: [status, headers, body]) [status, headers, body] end def call_without_logging(env) @app.call env end end
Ϣʔεέʔε ϩάهϛυϧΣΞ wڥมͰ༗ޮɾແޮͷΓସ͑ wίʔυͷมߋɾσϓϩΠͱʹෆཁ wτϥϒϧ࣌ʹ͙͑͢Δ
Ϣʔεέʔε "1*αʔόʔͷϚΠάϨʔγϣϯ
Ϣʔεέʔε "1*αʔόʔͷϚΠάϨʔγϣϯ w(SBQF 3BDL ͔Β3BJMTϕʔε wNBTUFSͱSBJMTϒϥϯνΛฒߦՔಇ w༷ࢠΛݟͳ͕ΒΏͬ͘ΓΓସ͑Δ
αʔόʔߏ Database API
αʔόʔߏ Database API API (Rails)
αʔόʔߏ Database API API (Rails)
"1*αʔόʔଆͷ࡞ۀ IFSPLVGPSLBQJSBJMTBQQBQJ IFSPLVEPNBJOTBEEBQJSBJMTRVJQQFSDPN HJUQVTIIFSPLVSBJMTNBTUFS
ΞϓϦέʔγϣϯଆͷ࡞ۀ ʢ˞ڥม"1*@63-ͰΤϯυϙΠϯτΛࢦఆʣ IFSPLVDPOpHTFUa "1*@63-IUUQTBQJSBJMTRVJQQFSDPN
࠷খݶͷΦϖϨʔγϣϯͰҠߦྃ ʢ˞ΞϓϦέʔγϣϯͷ࣮ʹΑΓ·͕͢ɾɾɾʣ wμϯλΠϜແ͠ɺʮΏͬ͘ΓʯҠߦ w৽چαʔόʔΛฒߦՔಇ wαʔόʔΛʮ෦ʯͱͯ͠ѻ͏ w%JTQPTBCMF$PNQPOFOUT
wσϓϩΠɾ࠶ىಈɾઃఆมߋͷཤྺ wʮ୭͕ʯʮ͍ͭʯʮԿΛ͔ͨ͠ʯ w(JUͷίϛοτ͕ه͞ΕΔ wෳਓͰͷӡ༻ʹඞਢ 1SP5JQIFSPLVSFMFBTFT
Ϣʔεέʔε #J[%FW͕1VMM3FRVFTUΛςετ ඇ։ൃऀ(JU)VC'MPXʹר͖ࠐΜͰ ΈΜͳϋοϐʔʹͳͬͨ IUUQCMPHNBEPSPPSHNO
։ൃऀ͕1VMM3FRVFTU ʢςελʔ͚ͷνΣοΫϦετ͖ʣ
+FOLJOT͕1VMM3FRVFTUϒϥϯνΛςετ (SFFOͩͬͨΒ)FSPLVʹσϓϩΠ
ςελʔσϓϩΠ͞Εͨ63-Λ։͍ͯ ϒϥβͰಈ࡞νΣοΫ
ίʔυϨϏϡʔ ςελʔͷಈ࡞νΣοΫ ྆ํ0,ͳΒଞͷ։ൃऀ͕Ϛʔδ
%FNPOTUSBCMF1VMM3FRVFTUT wϚʔδ͕શһʹͱͬͯͷʮྃʯʹ wίϛϡχέʔγϣϯ͘͢͠ͳͬͨ wνʔϜશମͷεϐʔυײ͕͕͋ͬͨ wϦϦʔεɾσϓϩΠࣄނ͕ݮͬͨ IUUQTCMPHIFSPLVDPNBSDIJWFTIFSPLVGPSL
˞࣮ࡍͷίϚϯυ ͬͱటष͍Ͱ͕͢ɾɾɾ IFSPLVGPSLBQJGFBUVSF(*5@#3"/$)BQQBQJ HJUQVTIa HJU!IFSPLVDPNBQJGFBUVSF(*5@#3"/$)HJUa (*5@#3"/$)NBTUFS
ٯʹ)FSPLVͰΠϚΠνͳͱ͜Ζʁ wڥมʹґଘ͗͢͠ΔϦεΫ w)FSPLVʹ׳Ε͗ͯ͢ΨϥύΰεԽ͢ΔϦεΫ wݸਓͰ͏ʹͪΐͬͱׂߴʢແྉআ͘ʣ wʢਖ਼ͦΜͳʹෆຬແ͍ʂʣ
ڥมʹґଘ͗͢͠ΔϦεΫ wಈతʹܾ·ΔڥมѲͮ͠Β͍ཁૉ wຊདྷόʔδϣϯཧ͖͢ʢઃఆϑΝΠϧʣ wΞϓϦέʔγϣϯ͕ڥมʹґଘ͗͢͠Δ wʮਖ਼͍͠ʯΛΒͳ͍ͱಈ͔ͤͳ͍ wυΩϡϝϯτͱίϛϡχέʔγϣϯͰΧόʔ
ʢ͕ࣗʣΨϥύΰεԽ͢ΔϦεΫ w)FSPLVҎ֎ͷڥͰԿͰ͖ͳ͘ͳΔ wྲྀߦͷ%FW0QTٕज़Λࢼ͢ػձ͕ແ͍ wศར͗ͯ͢ΠϯϑϥͷτϨϯυʹૄ͘ͳΔ w)FSPLVϓϥοτϑΥʔϜʹғ͍ࠐ·ΕΔ w༨ՋΛར༻ͯ͠1BB4*BB4Λݚڀ͠·͠ΐ͏
ݸਓͰ͏ʹͪΐͬͱׂߴʢແྉআ͘ʣ wʮ͘͞Βͷ714ʯ͕҆͗͢Δ͚ͩʁ wࢿͱࢥͬͯదʹ՝ۚ͢Δͷ͕٢ʁ w)FSPLV͕Ṷ͔ͬͯԼ͛͢ΔͱΈΜͳخ͍͠ wզʑ։ൃऀ͕Γཱ͍͖ͯͯ·͠ΐ͏
·ͱΊ w2VJQQFSͷ։ൃࣄྫΛհ͠·ͨ͠ w)FSPLV༏ΕͨϓϥοτϑΥʔϜͰ͢ wࣄʢϓϩμΫγϣϯ༻్ʣͰ͑·͢ w)FSPLVΤίγεςϜΛཧղ͢Δͱ͞Βʹศར
5IBOLZPV