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
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
390
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
Terraform Stacks入門 #HashiTalks
msato
0
360
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
180
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
6
670
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
170
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
260
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
430
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
How STYLIGHT went responsive
nonsquared
95
5.2k
Site-Speed That Sticks
csswizardry
0
28
Product Roadmaps are Hard
iamctodd
PRO
49
11k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Agile that works and the tools we love
rasmusluckow
327
21k
Scaling GitHub
holman
458
140k
4 Signs Your Business is Dying
shpigford
180
21k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
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ʹΞοϓϩʔυ ͓ੈʹͳͬͨϥΠϒϥϦͱ͔