Upgrade to Pro — share decks privately, control downloads, hide ads and more …

新規アプリ開発を支えるユーザ・決済基盤

uzzu
February 27, 2019

 新規アプリ開発を支えるユーザ・決済基盤

Cookpad TechConf 2019 登壇資料
https://techconf.cookpad.com/2019/

uzzu

February 27, 2019
Tweet

More Decks by uzzu

Other Decks in Technology

Transcript

  1. Ӊ௡ ޺Ұ (@uzzu)
    Ϣʔβɾܾࡁج൫෦
    ৽نΞϓϦ։ൃΛࢧ͑Δ
    Ϣʔβɾܾࡁج൫

    View full-size slide

  2. ΞϓϦ
    ࡞ͬͯ·͔͢ʁ
    2

    View full-size slide

  3. Ϣʔβ؅ཧ/ೝূ
    3

    View full-size slide

  4. ΞϓϦ಺՝ۚ
    4

    View full-size slide

  5. ΫοΫύουͰഓͬͨ
    Ϣʔβ؅ཧ/ܾࡁϊ΢ϋ΢Λ
    ༗ޮ׆༻ͯ͠
    ৽نΞϓϦ։ൃΛՃ଎͢Δඞཁ͕͋Δ

    View full-size slide

  6. Cuisine/Client
    9

    View full-size slide

  7. Cuisine/Client
    10
    ϢʔβೝূͱΞϓϦ಺՝ۚػೳͷಋೖΛՃ଎͢Δʹ͸
    ɾAPI௨৴࣌ʹࣗಈ࠶ೝূ͢Δ
    ɾೝূϑϩʔΛΧελϚΠζͰ͖Δ
    ɾΞϓϦ಺՝ۚ(ఆظߪಡ)Λ؆୯ʹར༻Ͱ͖Δ

    View full-size slide

  8. API௨৴࣌ʹࣗಈͰ࠶ೝূ͢Δ
    11
    ɾAPI௨৴࣌ʹೝূॲཧΛͳΔ΂͘ҙࣝͤ͞ͳ͍
    ɹೝূࣦഊ࣌ʹ͸ࣗಈͰ࠶ೝূΛ࣮ࢪ
    ɾ[iOS] APIΫϥΠΞϯτ·ͰؚΊͯఏڙ (APIKit-likeͳܗ)
    ɾ[Android] OkHttp(HTTPΫϥΠΞϯτϥΠϒϥϦ)ͷར༻Λ
    ɹલఏͱ্ͨ͠ͰͷඞਢίϯϙʔωϯτΛఏڙ

    View full-size slide

  9. ೝূϑϩʔΛΧελϚΠζͰ͖Δ
    12
    ɾStateMachineϕʔεͰͷ࣮૷(StartStateඞਢͳFSM)
    ɾೝূϑϩʔΛඪ४Ͱ਺ύλʔϯఏڙͯ͠ҰఆͷχʔζΛΧόʔ
    ɾΧελϚΠζ࣌͸…
    ɹStateΛఆٛ
    ɹStateʹରԠ͢ΔActionΛ࣮૷
    ɹඪ४ͷϑϩʔΛࢀߟʹStateMachineGraphΛߏங

    View full-size slide

  10. ΞϓϦ಺՝ۚΛ؆୯ʹར༻Ͱ͖Δ
    13
    ɾ֤ϓϥοτϑΥʔϜͷΞϓϦ಺՝ۚͷ
    ɹ࢓༷Λ౿·্͑ͨͰॲཧϑϩʔΛඪ४Խ
    ɾඪ४ͷॲཧϑϩʔͷϥούʔϥΠϒϥϦΛఏڙ
    ɾΞϓϦ։ൃऀ͸࠷௿ݶඞཁͳॲཧͷܨ͗ࠐΈ
    ɹΛ͢Δ͚ͩͰར༻Մೳ
    ɹ

    View full-size slide

  11. ΫϥΠΞϯταΠυͷෳࡶ͞Λ
    ٵऩͯ͠
    ৽نΞϓϦ։ൃΛ
    Ճ଎͢Δ

    View full-size slide

  12. Cuisine/Server
    15

    View full-size slide

  13. 16
    Ϣʔβొ࿥
    Cookpad API
    ܾࡁج൫
    Ϣʔβج൫
    Reverse Proxy
    Cookpad App (iOS, Android)
    ༷ʑ

    View full-size slide

  14. 17
    Ϣʔβొ࿥
    Cookpad API
    ܾࡁج൫
    Ϣʔβج൫
    Reverse Proxy
    Cookpad App (iOS, Android)
    ༷ʑ
    New App (iOS, Android, etc…)
    New App API

    View full-size slide

  15. 18
    Ϣʔβొ࿥
    Cookpad API
    ܾࡁج൫
    Ϣʔβ؅ཧ
    Reverse Proxy
    Cookpad App (iOS, Android)
    ༷ʑ
    New App (iOS, Android, etc…)
    New App API
    Ϣʔβج൫
    $PPLQBEݻ༗ͷػೳΛ
    ࡌͤͳ͍

    View full-size slide

  16. 19
    Ϣʔβొ࿥
    Cookpad API
    Ϣʔβج൫
    Reverse Proxy
    Cookpad App (iOS, Android)
    ༷ʑ
    New App API cuisine-api
    New App (iOS, Android, etc…)
    ܾࡁج൫
    Ϣʔβ؅ཧ
    ΞϓϦ಺՝ۚఆظߪಡ
    "1*Λ৽ઃ

    View full-size slide

  17. 20
    Ϣʔβొ࿥
    Cookpad API
    Ϣʔβج൫
    Reverse Proxy
    Cookpad App (iOS, Android)
    ༷ʑ
    New App API cuisine-api
    New App (iOS, Android, etc…)
    ܾࡁج൫
    ΞϓϦ಺՝ۚͷ
    ౎౓՝ۚʹ͍ͭͯ͸
    ॲཧϑϩʔͷΈඪ४Խ
    αʔϏεຖʹ࣮૷

    View full-size slide

  18. 21
    Ϣʔβొ࿥
    Cookpad API
    Ϣʔβج൫
    Reverse Proxy
    Cookpad App (iOS, Android)
    ༷ʑ
    New App API cuisine-api
    New App (iOS, Android, etc…)
    ܾࡁج൫
    $PPLQBEͷϦιʔε΋
    ࢀরͰ͖Δ

    View full-size slide

  19. 22
    Ϣʔβొ࿥
    Cookpad API
    Ϣʔβج൫
    Reverse Proxy
    Cookpad App (iOS, Android)
    ༷ʑ
    New App API cuisine-api
    New App (iOS, Android, etc…)
    ܾࡁج൫

    View full-size slide

  20. ※͋͘·Ͱ΋
    CookpadͰͷ࣮ફྫ
    23

    View full-size slide

  21. Organized Around
    Business Capabilities
    24

    View full-size slide

  22. Organized Around Business Capabilities
    25
    ɾCookpadͷ৽نαʔϏε͸ͦΕͧΕ͕ಠཱͨ͠ϏδωεΛ
    ɹ΍͍͍ͬͯͬͯΔ
    ɹ=> Ϣʔβܾࡁج൫ͷҰ൪ͷ੹຿͸
    ɹɹʮϢʔβ؅ཧ/ܾࡁػೳΛΑΓૣ͘ಋೖͰ͖ΔΑ͏ʹ͢Δʯ

    View full-size slide

  23. Organized Around Business Capabilities
    26
    ɾྫ͑͹ϓϨϛΞϜαʔϏεϢʔβ֫ಘΛ໨తͱͨ͠
    ɹ৽نαʔϏεల։ͩͬͨΒ…ʁ
    ɹ=> Ϗδωεͷओମ͸ΫοΫύουͷձһࣄۀ
    ɹ=> Ϣʔβܾࡁج൫ͷҰ൪ͷ੹຿͸
    ɹɹʮΫοΫύουͱ৽نαʔϏεؒͷϢʔβঢ়ଶ/ܾࡁঢ়ଶΛ
    ɹɹɹෆ੔߹গͳ͘ಉظͰ͖Δج൫αʔϏεΛߏங͢Δʯ

    View full-size slide

  24. 27
    Ϣʔβొ࿥
    Cookpad API
    Ϣʔβ؅ཧ
    Reverse Proxy
    Cookpad App (iOS, Android)
    ༷ʑ
    New App API cuisine-api
    New App (iOS, Android, etc…)
    ܾࡁ؅ཧ

    View full-size slide

  25. 28
    ϩάΠϯಋઢ
    Cookpad API
    Ϣʔβ؅ཧ
    Reverse Proxy
    Cookpad App (iOS, Android)
    ༷ʑ
    New App API
    New App (iOS, Android, etc…)
    ܾࡁ؅ཧ
    cuisine-api
    GSPOUFOEʹ͍ۙఔ
    ϏδωεىҼͰ
    4FSWFS"QQͷߏ੒΋੹຿΋
    มΘΔ

    View full-size slide

  26. 29
    Ϣʔβొ࿥
    Cookpad API
    Ϣʔβ؅ཧ
    Reverse Proxy
    Cookpad App (iOS, Android)
    ༷ʑ
    New App API
    New App (iOS, Android, etc…)
    ܾࡁ؅ཧ
    طଘͷ"1*ʹ
    ࣮૷͢Δະདྷ΋͔͋ͬͨ΋

    View full-size slide

  27. Ϗδωεͷํ޲ੑΛ
    ೺Ѳ্ͨ͠Ͱ
    Ϣʔβೝূ/ܾࡁػೳͷಋೖΛ
    Ճ଎͢Δ

    View full-size slide

  28. Cuisineͷࠓޙ
    31

    View full-size slide

  29. 34
    Ϣʔβొ࿥
    Cookpad API
    Ϣʔβ؅ཧ
    Reverse Proxy
    Cookpad App (iOS, Android)
    ༷ʑ
    New App API cuisine-api
    New App (iOS, Android, etc…)
    ܾࡁ؅ཧ
    $PPLQBE"QQ΋
    ಠཱͨ͠Ϗδωε

    View full-size slide

  30. 35
    Cookpad API
    Ϣʔβ؅ཧ
    ༷ʑ
    New App API
    New App (iOS, Android, etc…)
    ܾࡁ؅ཧ
    Reverse Proxy
    Cookpad App (iOS, Android)
    ߏ૝ஈ֊
    cuisine-api

    View full-size slide

  31. ࣮૷໘Ҏ֎΋
    36
    ɾσΟϨΫγϣϯ໘ͷෛ୲ܰݮ༨஍͋Γ
    ɹಋೖ·ͰͷϩʔυϚοϓ
    ɹApple৹͓ࠪ࡞๏(঎඼ઃܭ/UIσβΠϯ)
    ɾςετ߲໨͸ڞ௨ԽͰ͖ͦ͏
    ɹಋઢͷ਺Ͱ߲໨਺ͷͿΕ͸͋Δ΋ͷͷ
    ɹେےมΘΒͳͦ͏

    View full-size slide

  32. εϥΠυ͔Β͜΅ΕམͪͨτϐοΫ
    37
    •ΞΧ΢ϯτ౷߹ʹ͍ͭͯ
    •ΞϓϦ಺՝ۚॲཧϑϩʔͷڞ௨Խৄࡉ
    •iOS/StoreKitɺAndroid/Google Play IABϊ΢ϋ΢࿩
    •Android/Kotlin Multi Platform ProjectͰ΍͍͍ͬͯͬͯΔ

    ɹhttps://speakerdeck.com/uzzu/kotlin-mpp-library-tips
    •ਐԽతΞʔΩςΫνϟͱ͸…
    ؾܰʹ͓੠ֻ͚͍ͩ͘͞

    View full-size slide

  33. ͋Γ͕ͱ͏͍͟͝·ͨ͠
    @uzzu

    View full-size slide