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
13k
sbpayment.rbのご紹介
kyanny
0
2k
#AsiaDevNight
kyanny
0
110
Grape による API 実装 in action
kyanny
7
6.9k
<%= link_to "bundle", "update" %> - Make "bundle update" more fun to review
kyanny
2
4.9k
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
Jaspr Dart Web Framework 박제창 @Devfest 2024
itsmedreamwalker
0
140
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
340
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
100
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
410
命名をリントする
chiroruxx
1
570
どうして手を動かすよりもチーム内のコードレビューを優先するべきなのか
okashoi
3
820
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
630
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
1.2k
Flatt Security XSS Challenge 解答・解説
flatt_security
0
590
CloudflareStack でRAGに入門
asahiiwm
0
150
Zoneless Testing
rainerhahnekamp
0
150
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
270
Featured
See All Featured
Speed Design
sergeychernyshev
25
720
A Tale of Four Properties
chriscoyier
157
23k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
How GitHub (no longer) Works
holman
312
140k
It's Worth the Effort
3n
183
28k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
KATA
mclloyd
29
14k
GraphQLとの向き合い方2022年版
quramy
44
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
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