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
serverside-development-and-kaizen-with-golang
Search
azihsoyn
May 18, 2016
Technology
0
1.5k
serverside-development-and-kaizen-with-golang
azihsoyn
May 18, 2016
Tweet
Share
More Decks by azihsoyn
See All by azihsoyn
FlyleでのDBとの堅牢な付き合い方と パフォーマンス改善への取り組み
azihsoyn
1
150
crawler_by_aws_and_kotlin
azihsoyn
0
1.4k
firebase-with-flutter
azihsoyn
3
2.3k
Implementing Go Go Go
azihsoyn
4
4.4k
Other Decks in Technology
See All in Technology
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
1
170
Qiita埋め込み用スライド
naoki_0531
0
2.4k
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
260
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
280
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
260
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
160
UI State設計とテスト方針
rmakiyama
2
460
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
470
LINE Developersプロダクト(LIFF/LINE Login)におけるフロントエンド開発
lycorptech_jp
PRO
0
120
Wvlet: A New Flow-Style Query Language For Functional Data Modeling and Interactive Data Analysis - Trino Summit 2024
xerial
1
110
Storage Browser for Amazon S3
miu_crescent
1
140
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
The Cult of Friendly URLs
andyhume
78
6.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Automating Front-end Workflow
addyosmani
1366
200k
GraphQLとの向き合い方2022年版
quramy
44
13k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Optimising Largest Contentful Paint
csswizardry
33
3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
The Invisible Side of Design
smashingmag
298
50k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
How GitHub (no longer) Works
holman
311
140k
Transcript
GoαʔόͷϦϦʔεΛ͍͔ʹͯ͠ݮΒ͔ͨ͠ Gunosy Inc. 2016.5 @azihsoyn
©Gunosy Inc. 2 ࣗݾհ ▪ azihsoyn – Twitter – Github
– …etc ▪ ۀ – GoͰAPIαʔόͷ։ൃɾӡ༻ ▪ झຯ – Γ(5ׂ) • γʔόεΛϧΞʔͰ • ←ઌͬͨγʔόεͰ͢ – Ξχϝ(4ׂ) • ࠓظNo.1ࡾऀࡾ༿ – ։ൃ(1ׂ) • Androidͱ͔ @azihsoyn (͋͡;ͦΜͬͯಡΉΒ͍͠)
©Gunosy Inc. 3 ͍͖ͳΓͰ͕͢ɺA/Bςετͯ͠·͔͢ʁ
©Gunosy Inc. 4 Gunosyͷࣾ෩ ▪ ৽ػೳͷެ։ ▪ هࣄͷॱং ▪ νϡʔτϦΞϧ
▪ จݴมߋ ▪ ࠂग़͚͠ ▪ …etc ࣈ͕ਆΑΓਖ਼͍͠ = (جຊతʹ) ͲΜͳࢪࡦA/Bςετͯ͠ɺޮՌ͕ͳ͔ͬͨΒΊΔ શ෦A/Bςετ͠·͢
©Gunosy Inc. 5 ͲͷΑ͏ʹӡ༻͍͔ͯͨ͠ ͦͦϋʔυίʔσΟϯάͩͬͨ
©Gunosy Inc. 6 ͲͷΑ͏ʹӡ༻͍͔ͯͨ͠ ͦͦϋʔυίʔσΟϯάͩͬͨ ݻఆʂʂA/Bͱ… ·͔͞ͷʂʂ ͜ͷϢʔβʔʹͨ͠ҙຯ͕ίʔυ͔ΒΘ͔Βͳ͍
©Gunosy Inc. 7 ͲͷΑ͏ʹӡ༻͍͔ͯͨ͠ ▪ A/B։͍࢝ͨ͠ਓ͕ϓϧϦΫΛૹΔ – ίʔυमਖ਼ – ςετՃ
▪ APIνʔϜ͕ϨϏϡʔ ▪ Ϛʔδ ▪ ϦϦʔε࡞ۀ – git flow – stagingͰಈ࡞֬ೝ – ϦϦʔε࿈བྷ – σϓϩΠ ϋʔυίʔσΟϯάͱ͍͏͜ͱɺɺɺ ऴྃ࣌ಉ༷ͷϑϩʔʂʂ
©Gunosy Inc. 8 ͜͏͍͏ґཔׂ͕ΓͱΧδϡΞϧʹདྷΔ
©Gunosy Inc. 9 ▪ A/Bςετͷ։࢝ɾมߋɾऴྃʹ͔͔Δίετ͕ߴ͍ – ࠓதʹ͓ئ͍͠·͢ͱ͔ͩͱ1͙࣌ؒΒ͍༨༟Ͱ௵ΕΔ – ࣗͷ࡞ۀ͕Ͱ͖ͳ͍
▪ ͍ΖΜͳνʔϜ͔ΒA/Bͷґཔ͕͘ΔͷͰϦϦʔεසଟ͘ͳΔ – 1ϦϦʔε/4.4dayͩͬͨ – ϦϦʔεΛίϯτϩʔϧͰ͖ͳ͍ ▪ ਖ਼ࣜͳϦϦʔεΛ͏ͷͰɺٸͳґཔʹରԠͰ͖ͳ͍ – ͏developʹϚʔδͯͨ͠ͷʹɺɺɺͱ͔ – ༵ۚʹA/BΛ։࢝ͨ͘͠ͳ͍ ▪ ίʔυ͔ΒA/Bςετ͕Ͳ͏͍͏ঢ়ଶͳͷ͔Θ͔Βͳ͍ – ͏ऴΘͬͨͷ͔ – ͍͔ͭΒͬͯΔͷ͔
©Gunosy Inc. 10 Ͳ͏վળ͔ͨ͠
©Gunosy Inc. 11 A/BςετʹؔΘΔίʔυΛ֎෦ઃఆϑΝΠϧԽ
©Gunosy Inc. 12 ͬͨ͜ͱ ▪ ෆཁͳ(ऴྃͨ͠)A/BςετͷίʔυΛআ ▪ ඞཁͳมͷચ͍ग़͠ – ϢʔβʔID,
OSछผ, ΞϓϦόʔδϣϯ,… ▪ ඞཁͳϩδοΫͷચ͍ग़͠ – mod, ൣғ, Ұக, … ▪ ઃఆϑΝΠϧͷϑΥʔϚοτ – json, yaml, toml, go, ಠࣗDSL… ▪ ઃఆϑΝΠϧ͔Βಈతʹܭࢉ͢ΔϥΠϒϥϦ୳͠ ▪ ӡ༻ํ๏ ཁϦϑΝΫλϦϯά
©Gunosy Inc. 13 ෆཁͳA/BςετͷίʔυΛআ ▪ ຊʹϨεϙϯεฦ͞ͳͯ͘ͳ͍͔ʁ – ݻఆ͚ͩͲΞϓϦ͕ύʔεͯ͠Δ͔ – →Ϩεϙϯε͔Βআͨ͠ΒΫϥογϡ͢Δ͔
▪ ͦͦandroid͚ͩɺios͚ͩͷͨΊͷϑΟʔϧυͱ͔͋ͬͨ ؆୯ͳ͜ͱͰͳ͔ͬͨ… ΞϓϦνʔϜʹڠྗͯ͠Β͍ͳ͕ΒͳΜͱ͔ୀ࣏
©Gunosy Inc. 14 ඞཁͳมͷચ͍ग़͠ ▪ ϢʔβʔID – Θ͔Δ ▪ OS
– ·͊Θ͔Δ ▪ ΞϓϦόʔδϣϯ – ΞϓϦΛߋ৽͠ͳ͍ͱA/B։࢝Ͱ͖ͳ͍ͣͳͷͰ͍Βͳ͍ͣ – আ ▪ ܕ – boolҎ֎ฦ͞ͳ͍ ϢʔβʔID͚ͩͰ͍͍ͣ
©Gunosy Inc. 15 ඞཁͳϩδοΫͷચ͍ग़͠ ▪ mod ▪ in ▪ is
▪ and/or ▪ ݻఆ – ݻఆฦͯ͠ΔͳΒA/BऴྃͰ͍͍ͣ – ޙํޓͷͨΊʹํͳ͘ɺɺɺ ▪ span – ظؒࢦఆͰ͖ΔΑ͏ʹՃ ͕͜͜Ұ൪Μͩɺɺɺ
©Gunosy Inc. 16 ઃఆϑΝΠϧͷϑΥʔϚοτ jsonҰ(طʹଞͷઃఆϑΝΠϧjsonͩͬͨ)
©Gunosy Inc. 17 ઃఆϑΝΠϧ͔Βಈతʹܭࢉ͢ΔϥΠϒϥϦ୳͠ ▪ ͋Δʹ͋ͬͨ – https://github.com/mattn/anko – https://github.com/Knetic/govaluate
▪ ࣗ༝ա͗ΔͱٯʹࣄނΓͦ͏ – ͔ͿͬͪΌ͍͚ͳ͍Ϣʔβʔʹద༻ͪ͠Όͬͨͱ͔ ▪ goͷ੩తܕ͚ͷϝϦοτ͕ࣦΘΕΔ ▪ ٯʹ੍ݶ͍ͯ͘͠ํʹγϑτ phpͷeval(bashͷexpr)Έ͍ͨͳͷ͕ཉ͍͠ɺɺɺ ͦ͏ࢥ͍ͬͯͨ࣌ظ͕Զʹ͋Γ·ͨ͠ ࣗલͰϥΠϒϥϦ࡞ͬͨ
©Gunosy Inc. 18 ӡ༻ํ๏ ▪ ઃఆϑΝΠϧΛฤू͢Δͷʁ – ؆୯ͳjsonͩͬͨΒ·ͩ͠… – ଞͷਓʹઃఆϑΝΠϧฤूͯ͠Β͏ͱࣄނ͕ා͍
▪ A/Bςετ͕Ͳ͏͍͏ঢ়ଶ͔͔Βͳ͍ղܾͯ͠ͳ͍ – ͔ͱ͍ͬͯཧπʔϧΘ͟Θ͟࡞Δͷ… issueͰཧ͢Δͷ͙ܾ͢·͕ͬͨ
©Gunosy Inc. 19 ͦΕɺGoogle εϓϨουγʔτͰͰ͖·͢Α GAS+S3ΛͬͯαʔϏεӡӦ͚ઃఆπʔϧΛઈ؆୯ʹ࡞͢Δํ๏ http://qiita.com/hirokidaichi/items/769e330284302a799095
©Gunosy Inc. 20 ͜ΜͳεϓϨουγʔτ͔Β
©Gunosy Inc. 21 ͜ΜͳjsonΛੜ { "enable_A_ab_test": [ { "fixed": true
} ],... "enable_F_ab_test": [ { "span": { "start": "2016-02-15T00:00:00+09:00", "end": null }, "mod": { "value_key": "user_id", "divisor": 20, "values": [ 0,1,2,3,4,5,6,7,10 ] }, "is": { "value_key": "os", "value": "ios" } } ],... }
©Gunosy Inc. 22 Ϙλϯ1ൃͰS3ʹΞοϓϩʔυ ͋ͱOpsWorksͰۭσϓϩΠ͢Δ͚ͩ
©Gunosy Inc. 23 ӡ༻ํ๏ ▪ A/B։͍࢝ͨ͠ਓ͕issueΛىථ – 1 A/B 1
issue – ׂ߹มߋه – ऴྃ࣌ʹclose ▪ APIνʔϜ͕εϓϨουγʔτͰϙνϙνฤू – Ϙλϯ1ͭͰjsonʹมͯ͠S3ʹΞοϓϩʔυ ▪ ઃఆϑΝΠϧΛ࠶ಡࠐ͢ΔͨΊʹۭσϓϩΠ – εςʔδϯάͰͷݕূجຊ͍ͯ͠ͳ͍ – → ͢Ͱʹಈ͍͍ͯͨίʔυͳͷͰͳΜͷෆ҆ͳ͍ͨΊ ࠷ऴతʹ͜͏ͳͬͨ 15͙Β͍ͰऴΘΔ
©Gunosy Inc. 24 վળ ▪ Ұճͷ࡞ۀ͕࣌ؒ15ʹॖʂ – ࡞ۀͷ߹ؒʹͰ͖Δ ▪ ϦϦʔεස͕1ճ/4.4day
→ 1ճ/7.5dayʹʂ – ϦϦʔεΛίϯτϩʔϧͰ͖ΔΑ͏ʹͳͬͨ ▪ ༵ۚͰA/Bͷ։࢝ɾมߋɾऴ͕ྃͰ͖ΔΑ͏ʹͳͬͨ – ࢪࡦΛΒͤͳ͍ ▪ εϓϨουγʔτͰA/Bςετͷঢ়ଶ͕ݟ͘͢ͳͬͨ େମղܾͰ͖ͨ
©Gunosy Inc. 25 ՝·ͩ͋Δ ▪ ͦͦεϓϨουγʔτͰཧͬͯͲ͏ͳͷʁ – ཤྺͱ͔ݖݶͱ͔ – ཧผγεςϜʹ͍ͨ͠…
▪ ؾܰʹมߋͰ͖Δͷ͍͍͚ͲɺώϡʔϚϯΤϥʔ͕ى͖͘͢ͳͬͨ – A/BࢭΊ͕ͨͣࢭ·ͬͯͳ͔ͬͨͱ͔ ▪ ۭσϓϩΠΊΜͲ͍͘͞ – ఆظతʹ࠶ಡࠐ͢Δʁ(͜Ε͍ۙ͏ͪʹͰ͖ͦ͏) ▪ ϩδοΫͷมߋ࣌ʁ – ۙͷ՝
©Gunosy Inc. 26 ·ͱΊ ▪ jsonศར ▪ ϓϩηεΩϟογϡศར – ىಈ࣌ʹઃఆϑΝΠϧಡΈࠐΉ
▪ ൚༻ੑΑΓ੍ݶ͢ΔํͰߟ͑Δ – interfaceଟ༻͢Δ͜ͱʹͳΔͷͰGoͷ੩తܕ͚ͷϝϦοτ͕ࣦΘ Εͯ͠·͏ ▪ શ෦ࣗલͰ࡞ΔͷͰͳ͘ɺ͋ΔͷΛΈ߹Θͤͯ࡞Δ – ؤுͬͯཧπʔϧ࡞Ζ͏ͱ͠ͳͯ͘Α͔ͬͨ – εϓϨουγʔτ࠷ߴա͗Δ
©Gunosy Inc. 27 ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠
©Gunosy Inc. 28 ͦͷଞࢿྉ ▪ https://github.com/mattn/anko – phpͷevalతͳͷΛgoͰ୳ͯ͠ ▪ https://github.com/Knetic/govaluate
– phpͷevalతͳͷΛgoͰ୳ͯ͠ ▪ https://github.com/guregu/buildver – όʔδϣϯ൪߸ൺֱ͢ΔϥΠϒϥϦ ▪ http://qiita.com/hirokidaichi/items/769e330284302a799095 – εϓϨουγʔτ͔ΒS3ʹΞοϓϩʔυ ͓ੈʹͳͬͨϥΠϒϥϦͱ͔