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
ハイテク休憩
sat
PRO
2
170
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
170
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
380
DevFest 2024 Incheon / Songdo - Compose UI 조합 심화
wisemuji
0
120
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
270
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
19
18k
第3回Snowflake女子会_LT登壇資料(合成データ)_Taro_CCCMK
tarotaro0129
0
200
生成AIのガバナンスの全体像と現実解
fnifni
1
190
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
250
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
270
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
22
1.2k
A better future with KSS
kneath
238
17k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
KATA
mclloyd
29
14k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Visualization
eitanlees
146
15k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
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ʹΞοϓϩʔυ ͓ੈʹͳͬͨϥΠϒϥϦͱ͔