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
Seiji Takahashi
August 04, 2017
Programming
17
16k
マイクロチームでの高速な新規開発を支える開発・分析基盤
マイクロチームでの高速な新規開発を支える開発・分析基盤 by @__timakin__
Builderscon2017でのプレゼン内容です。
Seiji Takahashi
August 04, 2017
Tweet
Share
More Decks by Seiji Takahashi
See All by Seiji Takahashi
Go Backends for frontends with GraphQL and gRPC
timakin
6
3.7k
Design Pattern for Image and Text Composition in Go
timakin
5
6.5k
Golang API Testing the HARD way
timakin
13
6.4k
Head First Golang Image Package
timakin
2
9.9k
React Native Beyond Prototype
timakin
2
1.6k
Performance Optimization on Google AppEngine
timakin
5
6.1k
testcache.pdf
timakin
1
120
How Go cache
timakin
1
63
How Go cache tests
timakin
1
2.9k
Other Decks in Programming
See All in Programming
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
280
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
役立つログに取り組もう
irof
28
9.6k
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
as(型アサーション)を書く前にできること
marokanatani
9
2.6k
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
最新TCAキャッチアップ
0si43
0
140
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Making Projects Easy
brettharned
115
5.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Designing for Performance
lara
604
68k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
A better future with KSS
kneath
238
17k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Transcript
ϚΠΫϩνʔϜͰͷ ߴͳ৽ن։ൃΛࢧ͑Δ ։ൃɾੳج൫ @__timakin__ builderscon 2017
ࣗݾհ • timakinʢಡΈ: ͪ·͖Μʣ • https://github.com/timakin • https://twitter.com/__timakin__ • Gunosy৽نࣄۀ։ൃࣨ
• Contributor of Golang <- New! • Go/SwiftΛϝΠϯʹॻ͍͍ͯ·͢ɻ
Copyright© Gunosy Inc. All Rights Reserved 3 Go / Python
ΤϯδχΞืूத ▶https://gunosy.co.jp/recruit/ Gunosyɺ౦ژେֶʹ௨͏3ਓͷֶੜͷ ʮใΛੈքதͷਓʹ࠷దʹಧ͚͍ͨʯͱ͍͏͍͔Β࢝·Γ·ͨ͠ɻ ౦ূϚβʔζ্ɺຊώϧζͷΦϑΟεҠసΛܦͯɺ େ͖͍ͯ͘͠ΔձࣾͰ׆༂͍ͨ͠ϝϯόʔΛืू͍ͯ͠·͢ɻ
ࠓ͢͜ͱ • ʮLUCRAʯॳظϦϦʔε·ͰͷಓͷΓͱ੍݅ • ͍։ൃظؒͰͬͨ͜ͱɺΒͳ͔ͬͨ͜ͱ • ։ൃج൫ͷհ • ॊೈͳԾઆݕূ͕Մೳͳڥͮ͘Γ
ݶΒΕͨϦιʔεԼͰͷ ߴͳ։ൃख๏ খ͍͞νʔϜͰPDCAΛ ճͤΔੳج൫
ݶΒΕͨϦιʔεԼͰͷ ߴͳ։ൃख๏
࣮ྫɿʮLUCRAʯ
None
ʮLUCRAʯॳظϦϦʔε·Ͱͷ ಓͷΓͱ੍݅
εέδϡʔϧͱ੍݅ • εέδϡʔϧ • 3ϲ݄ؒ (3݄~5݄) • ։ൃνʔϜͷن • ৽نϓϩδΣΫτۃྗগͰʂ
• ࣄͰGoͷAPIɺSwiftͰͷiOSΞϓϦ։ൃܦݧͳ͠
εέδϡʔϧͱ੍݅ • ։ൃཁ݅ • iOSΫϥΠΞϯτ
εέδϡʔϧͱ੍݅ • ։ൃཁ݅ • iOSΫϥΠΞϯτ • هࣄɺάϧʔϐϯάใɺϢʔβʔೝূଞϦιʔεશମʹؔΘ ΔAPI
εέδϡʔϧͱ੍݅ • ։ൃཁ݅ • iOSΫϥΠΞϯτ • هࣄɺάϧʔϐϯάใɺϢʔβʔೝূଞϦιʔεશମʹؔΘ ΔAPI • هࣄੜɺػցֶशج൫
• Ϋϩʔϥʔ / ίϯςϯπྨ / هࣄςϯϓϨੜAPI
εέδϡʔϧͱ੍݅ • ։ൃཁ݅ • iOSΫϥΠΞϯτ • هࣄɺάϧʔϐϯάใɺϢʔβʔೝূଞϦιʔεશମʹؔΘ ΔAPI • هࣄੜɺػցֶशج൫
• Ϋϩʔϥʔ / ίϯςϯπྨ / هࣄςϯϓϨੜAPI • पลڥ • Ωϟογϡػߏ / Τϥʔ, syslogࢹ / ཧπʔϧ • Pushج൫ / ϩάੳج൫ / ABςετج൫
εέδϡʔϧͱ੍݅ • ϙΠϯτ 1. νʔϜͷਓۃྗ͑Δɻ 2. ߏங͢Δج൫ʹରͯ͠։ൃظ͕͍ؒɻ 3. ੳ͕Ͱ͖ΔڥΛ࠷ॳ͔Βߏங͢Δɻ
࣮ࡍʹԿΛ͔ͬͨʁ
࣮ࡍͷεέδϡʔϧ ݄ • API • ϞοΫඋʢεϐʔυײʹ߹Θͣ1͘Β͍͔͠ʹཱͨ ͣʣ • هࣄɺάϧʔϐϯάใAPIͷ࡞ +
stgڥߏங • ΫϥΠΞϯτ • UtilɺAPIClientɺLoggingɺϧʔςΟϯάपΓͷඋ • ػցֶशɺهࣄੜج൫ • Ϋϩʔϥʔ࡞ + stgʹॾʑͷΠϯϑϥߏங ԼճΓͷඋͱϓϩτλΠϓ࡞
࣮ࡍͷεέδϡʔϧ ݄ • API • ϢʔβʔೝূAPIͷ࡞ • ΫϥΠΞϯτͭͳ͗͜Έ • push,
ABج൫, Ωϟογϡؔ࿈ͷௐ, ϩάج൫ͷ࡞ • ΫϥΠΞϯτ • هࣄҰཡɺৄࡉը໘σβΠϯͯࠐΈ • ೝূɺpushɺར༻نɾFAQ֤छઃఆɺڧ੍Ξοϓσʔτ • ػցֶशɺهࣄੜج൫ • هࣄྨɺΫϩʔϥʔɺؔ࿈هࣄੜͷ࡞ɺstgڥߏங ࣮٧Ί + σβΠϯͯࠐΈ
࣮ࡍͷεέδϡʔϧ ݄ • API • ϩάج൫ɺϛυϧΣΞ(Τϥʔ, syslogࢹɺmemd)ͷ setup • ֤छهࣄࣗಈੜج൫ɺϩάج൫ͱͷͭͳ͗͜Έ
• ຊ൪ڥߏங • ΫϥΠΞϯτ • σβΠϯϒϥογϡΞοϓɺจݴɾಈ࡞मਖ਼ɺਃ࡞ۀ • ػցֶशɺهࣄੜج൫ • ྨɺείΞ͚ϩδοΫͷमਖ਼ɺଞAPIͷमਖ਼ɺ֤छຊ൪ ڥߏங ϛυϧΣΞՃɺ֤APIͭͳ͗͜Έɺຊ൪ڥߏங
ॕʂϦϦʔεʂ
͜ͷظؒͷ։ൃνʔϜͷঢ়گ
աࠅͳεέδϡʔϧ
աࠅͳεέδϡʔϧ ۀଓ͖ͷʑ
աࠅͳεέδϡʔϧ ۀଓ͖ͷʑ ߥΕΔਓؒؔ
ʁ
աࠅͳεέδϡʔϧ ۀଓ͖ͷʑ ߥΕΔਓؒؔ
ΪϦΪϦ ͚ͩͲ Φϯεέ
ΪϦΪϦ ͚ͩͲ Φϯεέ ఆ࣌Ͱࣦྱ
ΪϦΪϦ ͚ͩͲ Φϯεέ ఆ࣌Ͱࣦྱ ࿕Β͔ͳ ৬
ʁ
• Δ / Βͳ͍ͷΓ͚ • ج൫෦ͷ๛ͳϊϋ
͍։ൃظؒͰ ͬͨ͜ͱɺΒͳ͔ͬͨ͜ͱ
Δ/Βͳ͍ͷج४ • ΞϓϦͷίϯηϓτΛ࠷খݶͷൣғͰ ݕূ͢Δͷʹඞཁ͔
Δ/Βͳ͍ͷج४ • ΞϓϦͷίϯηϓτΛ࠷খݶͷൣғͰ ݕূ͢Δͷʹඞཁ͔ • ඦສDAUʹεέʔϧ͢Δମ੍͕͏͔
Δ/Βͳ͍ͷج४ • ΞϓϦͷίϯηϓτΛ࠷খݶͷൣғͰ ݕূ͢Δͷʹඞཁ͔ • ඦສDAUʹεέʔϧ͢Δମ੍͕͏͔ • ੳɾӡ༻ɾվળͷϑϩʔΛΓͳ͘౿ΉͨΊͷ ػೳ͕ἧ͍ͬͯΔ͔
• هࣄྨɾੜج൫ • ੳج൫ • ೝূɺ هࣄͷҰཡɺӾཡɺ γΣΞ • ※৹ࠪʹ͍+α
Δ Βͳ͍ • Android • ݫີͳϦϑΝΫλ • “ߴͰແବͷͳ͍”ج൫ • ݕࡧ • ϑΥϩʔɾ͓ؾʹೖΓ • Ӿཡཤྺػೳ
ඞཁͳͷهࣄ͕ݟΒΕͯɺ ݕূɺӡ༻Մೳͳج൫Λ࡞Δ͜ͱ
طଘϓϩμΫτ͔Β Ԡ༻Ͱ͖Δ෦Λ βΫβΫऔͬͯ͜Α͏
Πϯϑϥ
Πϯϑϥߏஙฤ • جຊతʹAWS OpsworksͰɺࣗࣾͷΧελϜChefϨγ ϐΛϕʔεʹڥߏங͢Δ • gunosy/gunosy_opsworks_cookbook
Πϯϑϥߏஙฤ
Πϯϑϥߏஙฤ • middleware • papertrail, td_agent, datadog, nginx, memcached •
ଞɺmysql, jq, einhornʢGoͷAPIͷgraceful restart ༻్ʣͳͲΛΆͪΆͪೖΕΔ
Πϯϑϥߏஙฤ • codenize-tools • miamʢIAMཧʣ • piculetʢSGʣ • roadworkerʢRoute53ʣ •
radiosondeʢCloudWatch Logsʣ • monosasiʢCloudWatch Eventsʣ
git pushͨ͠ΒCircleCI্Ͱ֤ίϚϯυΛୟ͖ɺ Slackʹapply݁ՌͷJSONϖΠϩʔυΛ௨
API
ͱ͜ΖͰ
GunosyGoͷར༻ྺ͕͍ʂ
ྺ࢙͕ੵΈॏͳΔͱ ੜ·ΕΔͷ
ศརͰ झ͕͋ΔUtility܈
gunosy/go
APIฤ • gunosy/go • mysql, redis, memd, fluent, airbrakeͳͲ ϛυϧΣΞΫϥΠΞϯτ܈͕ೖͬͯΔ
• jwt authenticator, fluent-loggerͳͲɺ ֤APIͰඞཁʹͳΔutilΛ·ͱΊͯΔ • OpsWorks࠷దͳઃఆಡΈࠐΈ
APIฤ • gunosy/goͷϝϦοτ / σϝϦοτ • ϝϦοτ • OpsWorksͰڥߏஙͯ͠deploy͢Εɺ API͕͍͍͙ͩͨ͢ಈ͘Α͏ʹͳͬͯΔɻ
• JWTೝূͳͲ΄΅࣮ʹࠩҟ͕ͳ͍ͷͰɺ ڞ௨ϥΠϒϥϦʹ͢ΔϝϦοτ͕େ͖͍ • ӡ༻ɺࢹपΓͷઃఆ͕OpsWorksͱͷ๊͖߹ΘͤͰ ͔ͳΓγϣʔτΧοτͰ͖Δ
APIฤ • gunosy/goͷϝϦοτ / σϝϦοτ • σϝϦοτ • ϛυϧΣΞ܈ɺͻ͍ͯ AWSͷґଘ͕ߴ͍ʂ
• loggerͷܗࣜมߋͳͲ͕ॊೈʹͰ͖ͳ͍
APIฤ • पลπʔϧ • SQLεΩʔϚgooseʢGomigration toolʣ Ͱཧ • graceful restart༻ʹɺeinhornͰϓϩηεཧ
APIฤ • ϑϨʔϜϫʔΫ • guregu/kami
APIฤ • guregu/kamiͷ • ContextʢGoͷrequest-scopedͳΛೖΕΔശΈ ͍ͨͳͭʣΛ݁ߏཞ༻͍ͯ͠Δɻ • ΰουΦϒδΣΫτ • panicΛѲΓͭͿͯ͘͠ΕΔ
APIฤ • ύοέʔδཧ • ࠷ۙݫີʹͳΓ࢝Ίͨ • աڈؾ߹͍ Ͱ࠷৽ʹ͍͔͍ͭͤͯͨ
APIฤ • ֤ͷղফʹ͚ͯ • AWS OpsWorksͷґଘͷߴ͞ • ϑϨʔϜϫʔΫΛguregu/kami -> net/httpʹҠߦ͠
ͯɺϛυϧΣΞ܈ϞσϧͷґଘΛղফɻ • DIύλʔϯͰॻ͘͜ͱͰɺͳΜͰglobalʹ٧Ίͯ ͍ͨॻ͖ํ͔Β٫
APIฤ • ֤ͷղফʹ͚ͯ • όʔδϣϯཧ • ґଘύοέʔδglideʹҠߦͯ͠ɺ దͳόʔδϣϯཧΛɻ
APIฤ • σϓϩΠϑϩʔ • git push • S3ʹGoͷόΠφϦ੩తϑΝΠϧΛ٧ΊͨtarΛ Ξοϓϩʔυ •
OpsWorksͷAPIΛୟ͍ͯS3͔ΒtarΛ͖࣋ͬͯͯ ల։ɺrestart͢Δ
ref: https://speakerdeck.com/kyokomi/gunosy-apitimugokai-fa-huro
APIฤ • CI • ॳظ։ൃͰϏϧυʹ࣌ؒΛऔΒΕΔͷѹతແବ • => CircleCI2.0ରԠʂ
APIฤ • ײಈͷཛྷ • goͷvendor, npm install assets:precompileͳͲ Ωϟογϡ͢Ε
͍͍ͩͨ1~2minsͰऴΘΔ
APIฤ • Ϋϩʔϥʔɺྨ • GunosyͰഓͬͨػցֶशج൫ϊϋΛϑϧ׆༻ • ϑϨʔϜϫʔΫ: Django • δϣϒεέδϡʔϥ:
Celery • σʔλߏ: GunosyFeed Ver.2 • ref: https://www.slideshare.net/mosa_siru/ss-65205273
APIฤ • هࣄྨɺੜʹඞཁͳAPI܈ • Crawler • GunosyFeedʹଇͬͨAPIΛୟ͍ͯσʔλΛऔͬͯ͘Δ • HTMLαχλΠζɺϑΟʔϧυใͷύʔαʔػߏ •
CategoryClassifier • هࣄͷΧςΰϦྨث • URL(υϝΠϯ)ʹΑΔϧʔϧϕʔεͷྨ + ػցֶशϞσϧʹΑΔྨ • NGఆ • TabGenerator • ಛఆΧςΰϦ(λϒ)ͷهࣄҰཡΛੜ • ElasticSearchʹੵͨ͠ӾཡɾΫϦοΫϩά͔ΒείΞϦϯάͯ͠อଘ • खಈϐοΫΞοϓͷӡ༻͚API
APIฤ • Ωϟογϡ • ϩʔΧϧͱϦϞʔτͷ̎ஈ֊ • memcached • هࣄɺݕࡧ݁ՌɺϚελʔσʔλͷΈΩϟογϡ
ref: https://www.slideshare.net/mosa_siru/go-memcached-microservices
APIฤ • Pushج൫ • mercari/gaurunΛfork(gunosy/gaurun) • gaurunͷόΠφϦΛS3ʹஔ͍ͱ͍ͯɺ OpsWorksͰdeploy • OpsWorksͷCustom
JSONͷઃఆΛ gaurunͷઃఆϑΝΠϧʹஔ͖͑ΔϨγϐ
ʂʂ
"1/T ($1 '$. AdminͰPush༧ Push API Gaurun API Bulk Publish
௨ड৴ Ұ࿈ͷ௨ϑϩʔ
ΞʔΩςΫνϟ
ΞʔΩςΫνϟฤ • ϚΠΫϩαʔϏεʹ͗͢͠ͳ͍
ref: https://www.slideshare.net/mosa_siru/ss-64839846
ΞʔΩςΫνϟฤ • ͳͥϚΠΫϩαʔϏεʹ͠ͳ͍ʁ • APIؒͷΦʔόʔϔου
ΞʔΩςΫνϟฤ • ͳͥϚΠΫϩαʔϏεʹ͠ͳ͍ʁ • APIؒͷΦʔόʔϔου • SGઃఆͳͲͷఔʹΑΔ։ൃͷԼ
ΞʔΩςΫνϟฤ • ͳͥϚΠΫϩαʔϏεʹ͠ͳ͍ʁ • APIؒͷΦʔόʔϔου • SGઃఆͳͲͷఔʹΑΔ։ൃͷԼ • σϓϩΠ͕͠ΜͲ͍
ΞʔΩςΫνϟฤ • ͳͥϚΠΫϩαʔϏεʹ͠ͳ͍ʁ • APIؒͷΦʔόʔϔου • SGઃఆͳͲͷఔʹΑΔ։ൃͷԼ • σϓϩΠ͕͠ΜͲ͍ •
ཧը໘ͷͨΊʹര͢ΔCRUD API܈
ΞʔΩςΫνϟฤ • LUCRAͰϚΠΫϩαʔϏεʹ͗͢͠ͳ͍ • هࣄऩूपΓ • ྨɺΫϩʔϥʔɺهࣄੜݸผʹɻ • Client͚ͷAPI •
هࣄɺάϧʔϐϯάใɺϢʔβʔใϝΠϯAPI͕શ෦ฦ͢ • PushɺABςετཧAPI͚ͩݸผʹɻ
iOS
iOSΫϥΠΞϯτฤ • MVVM + Reactive • Extension, APIClient, LoggerपΓͷUtil࠶ར༻Մೳ
iOSΫϥΠΞϯτฤ • ϩάૹ৴पΓͷίʔυ͕ଟ͍ -> σόοάେม • LogDebugger͕͋ΔͷͰϩά͕ૹΒΕ͔ͨΛͦͷ ͰσόοάͰ͖Δ • aikizoku/SKLogDebugger-iOS
None
iOSΫϥΠΞϯτฤ • ίϯύΠϧ࣌ؒͷݮ • Ϗϧυͪແҙࣝͷ͏ͪʹ૿͍͑͢ແବͳ࣌ؒ • -Xfrontend -debug-time-function-bodies ্هϑϥάͰɺϝιου୯ҐͷίϯύΠϧ࣌ؒΛܭଌ •
giginet/xcprofilerͰίϯύΠϧ͕͍ॱʹ֬ೝ
ms୯ҐͰϝιου͝ͱͷίϯύΠϧ࣌ؒܦաͷ ্ҐΛදࣔͯ͘͠ΕΔɻ
iOSΫϥΠΞϯτฤ • ίϯύΠϧ࣌ؒͷݮ • 50msҎ্ͷϝιου͕૿͑ͨΒվળ • giginet/danger-xcprofilerͰΞϥʔτ௨Մೳ
iOSΫϥΠΞϯτฤ • ىಈ࣌ؒͷݮ • DYLD_PRINT_STATISTICSϑϥάͷઃఆ • ґଘϥΠϒϥϦͷ੍ • ܕਪͷݮ •
SDKͷηοτΞοϓͷฒྻԽ
։ൃڥ·ͱΊ • Infrastructure as Codeపఈ & apply݁ՌͷՄࢹԽ • एׯͷґଘɺటष͍࣮ڐ༰ͭͭ͠ɺ AWS࠷దͳڥʹ͔ͬΔ͜ͱͰΛग़ͯ͠Δ
• ࠷ॳ͔ΒΞʔΩςΫνϟΛϚΠΫϩʹ͗͢͠ͳ͍ • ίϯύΠϧɺCIͳͲͷ܁Γฦ͠࡞ۀແବͳ࣌ؒΛ ա͝͞ͳ͍Α͏ʹɺࣗಈԽ & ߴԽ
খ͍͞νʔϜͰPDCAΛ ճͤΔੳج൫
࣮ࡍͲΜͳϩάΛ ૹ͍ͬͯΔ͔ʁ
͜ͷը໘ͰͲΜͳϩά͕ ൃੜ͠͏Δ͔ʁ
• launchΠϕϯτϩά • fore/backgroundϩά • push heartbeatϩά • ೝূ, initAPI
callϩά • ॳظදࣔ࣌هࣄimpϩά • ΧςΰϦεϫΠϓભҠϩά • ΧςΰϦΫϦοΫભҠϩά • εΫϩʔϧ࣌impϩά • هࣄΫϦοΫϩά • pull-refreshϩά • refresh࣌impϩά • push௨։෧ϩά
• launchΠϕϯτϩά • fore/backgroundϩά • push heartbeatϩά • ೝূ, initAPI
callϩά • ॳظදࣔ࣌هࣄimpϩά • ΧςΰϦεϫΠϓભҠϩά • ΧςΰϦΫϦοΫભҠϩά • εΫϩʔϧ࣌impϩά • هࣄΫϦοΫϩά • pull-refreshϩά • refresh࣌impϩά • push௨։෧ϩά ͍ͬͺ͍
Ͳ͏͍͏ϑϩʔͰ ૹ͍ͬͯΔ͔ʁ
ੳσʔλϑϩʔ
ੳσʔλϑϩʔ ొɾӾཡɾ ΫϦοΫϩάͷऩू
ੳσʔλϑϩʔ ొɾӾཡɾ ΫϦοΫϩάͷऩू td_agentʹΑΔ ϩάͷू
ੳσʔλϑϩʔ ొɾӾཡɾ ΫϦοΫϩάͷऩू td_agentʹΑΔ ϩάͷू ϩάछผ͝ͱʹ όοΫΞοϓ & ྲྀ͠ࠐΈ
ੳσʔλϑϩʔ ొɾӾཡɾ ΫϦοΫϩάͷऩू td_agentʹΑΔ ϩάͷू ϩάछผ͝ͱʹ όοΫΞοϓ & ྲྀ͠ࠐΈ
Redash্Ͱੳ
• ΫϥΠΞϯτ͔Βͷϩάcookpad/puree-ios Λ௨ͯ͡redshiftʹૹΔ • td_agent͕ೖͬͨlogूαʔόʔΛհͯ͠ɺ ՃࡁΈσʔλΛRedashʹྲྀ͢ • όοΫΞοϓͷͨΊʹkinesisΛڬΉ ੳσʔλϑϩʔ
࣮ࡍͷLogఆٛ (iOS)
࣮ࡍͷLogఆٛ (iOS)
Ͳ͏ͬͯσʔλΛݟΔ͔ʁ
ੳڥ • RedashΛར༻ • ओཁKPIఆظతʹSlackʹ௨ • ӡ༻ɺ։ൃΘͣνʔϜશһ͕ੳ༻SQLΛॻ͘
ͲΜͳΛ͍ͬͯΔ͔ʁ
ओཁKPI • DAU • 14ޙܧଓ • 7ޙܧଓ • 1ޙܧଓ •
ۙ1࣌ؒهࣄCTR • ొܦ࿏ผ֫ಘ • هࣄΫϦοΫճ/DAU • εϫΠϓճ/DAU • ͓ؾʹೖΓొ/DAU • શମ / ొܦ࿏ผίϗʔτ • Pushڐঢ়گ • ΧςΰϦผهࣄӾཡ
ੳ݁Ռͷར༻ • ʮ͓͠ΌΕͳΞϓϦʯͷϒϥϯυΠϝʔδΛٻͨ͠ ͍͔Βͱ͍ͬͯɺ ࠜڌͳ͘ʮϑΝογϣϯʯʮίεϝʯΛਪ͢ ͱ͍͏ҙࢥܾఆઈରʹ͠ͳ͍ɻ • ΧςΰϦผͷσʔλΛݟͯɺߴ͍CTRRR͕ ༧͞ΕΔPushػೳՃ͔͠ߦΘͳ͍ɻ
·ͱΊ • iOSΫϥΠΞϯτ͔Βܗͭͭ͠ϩάΛૹ৴ • ը໘୯ҐɺΞΫγϣϯ୯ҐͰऔΕΔ͚ͩͷϩάΛऔΔ • ੳπʔϧRedashΛ༻͍͓ͯΓɺνʔϜશମͰ SQLͷϝϯςφϯεΛߦ͏ • σʔλͰ֬৴͕࣋ͯͳ͍ࢪࡦۃྗڐ͞ͳ͍
ݶΒΕͨϦιʔεԼͰͷ ߴͳ։ൃख๏ খ͍͞νʔϜͰPDCAΛ ճͤΔੳج൫
ݶΒΕͨϦιʔεԼͰͷ ߴͳ։ൃख๏
։ൃख๏·ͱΊ • Infrastructure as Codeపఈ & apply݁ՌͷՄࢹԽ • एׯͷґଘɺటष͍࣮ڐ༰ͭͭ͠ɺ AWS࠷దͳڥʹ͔ͬΔ͜ͱͰΛग़ͯ͠Δ
• ࠷ॳ͔ΒΞʔΩςΫνϟΛϚΠΫϩʹ͗͢͠ͳ͍ • ίϯύΠϧɺCIͳͲͷ܁Γฦ͠࡞ۀແବͳ࣌ؒΛ ա͝͞ͳ͍Α͏ʹɺࣗಈԽ & ߴԽ
খ͍͞νʔϜͰPDCAΛ ճͤΔੳج൫
ੳج൫·ͱΊ • iOSΫϥΠΞϯτ͔Βܗͭͭ͠ϩάΛૹ৴ • ը໘୯ҐɺΞΫγϣϯ୯ҐͰऔΕΔ͚ͩͷϩάΛऔΔ • ੳπʔϧRedashΛ༻͍͓ͯΓɺνʔϜશମͰ SQLͷϝϯςφϯεΛߦ͏ • σʔλͰ֬৴͕࣋ͯͳ͍ࢪࡦۃྗڐ͞ͳ͍
͝੩ௌ༗͏͍͟͝·ͨ͠ʂ