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
100
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
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
2
770
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
250
快速入門可觀測性
blueswen
0
340
第5回日本眼科AI学会総会_AIコンテスト_3位解法
neilsaw
0
170
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
540
nekko cloudにおけるProxmox VE利用事例
irumaru
3
420
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
120
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
930
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
710
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
427
64k
Fireside Chat
paigeccino
34
3.1k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
A Philosophy of Restraint
colly
203
16k
What's in a price? How to price your products and services
michaelherold
243
12k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
A Modern Web Designer's Workflow
chriscoyier
693
190k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
97
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