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
フルカイテン株式会社 採用資料
fullkaiten
0
40k
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
信頼性に挑む中で拡張できる・得られる1人のスキルセットとは?
ken5scal
2
530
AGIについてChatGPTに聞いてみた
blueb
0
130
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
170
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
500
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
120
複雑なState管理からの脱却
sansantech
PRO
1
140
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
What's new in Ruby 2.0
geeforr
343
31k
Teambox: Starting and Learning
jrom
133
8.8k
Happy Clients
brianwarren
98
6.7k
Designing for Performance
lara
604
68k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Into the Great Unknown - MozCon
thekraken
32
1.5k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Statistics for Hackers
jakevdp
796
220k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
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ʹΞοϓϩʔυ ͓ੈʹͳͬͨϥΠϒϥϦͱ͔