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
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
26
6k
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
300
いりゃあせ、PHPカンファレンス名古屋2025 / Welcome to PHP Conference Nagoya 2025
ttskch
1
180
Simple組み合わせ村から大都会Railsにやってきた俺は / Coming to Rails from the Simple
moznion
3
2.2k
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
370
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
940
2025.01.17_Sansan × DMM.swift
riofujimon
2
560
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
770
Flatt Security XSS Challenge 解答・解説
flatt_security
0
740
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
290
watsonx.ai Dojo #6 継続的なAIアプリ開発と展開
oniak3ibm
PRO
0
170
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
590
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
182
22k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Scaling GitHub
holman
459
140k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Why Our Code Smells
bkeepers
PRO
335
57k
Bash Introduction
62gerente
610
210k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
Done Done
chrislema
182
16k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Designing for humans not robots
tammielis
250
25k
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