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

appengine-ja-night-35.pdf

9a7b669fdd4e6dfa349d05b49f61be28?s=47 Hiroyoshi HOUCHI
November 09, 2016
42

 appengine-ja-night-35.pdf

9a7b669fdd4e6dfa349d05b49f61be28?s=128

Hiroyoshi HOUCHI

November 09, 2016
Tweet

Transcript

  1. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. Hiroyoshi HOUCHI System

    Development Dept. Open Platform Business Unit
 DeNA Co., Ltd. "OE"QQ %F/"  ʹ͓͚Δ("&(P બఆ͔Β׆༻·Ͱ BQQFOHJOFKBOJHIU 1
  2. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ࣗݾ঺հ 2

  3. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ࣗݾ঺հ ์஍޺Ղ ⁃

    @hixi_hyi ͱ͔ hixi ͱ͔ͷ HN ࢖ͬͯ·͢ ॴଐ౳ʑ ⁃ גࣜձࣾDeNA ΦʔϓϯϓϥοτϑΥʔϜࣄۀຊ෦γεςϜ෦ ⁃ ৽ଔೖ͔ࣾΒͣͬͱϓϥοτϑΥʔϜ։ൃ (̐೥໨) ⁃ ࠓճͷϓϩδΣΫτͰ͸ٕज़બఆ΍ GCP ΛͲͷΑ͏ʹ࢖͍ͬͯ͘ͱ͔ܾΊ ͨΓͯ͠·ͨ͠ 3
  4. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ࠓ೔ͷ಺༰ 4

  5. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. AndApp ʹ͓͚Δ GAE/Go

    બఆ͔Β׆༻·Ͱ ͳͥ GAE/Go ΛબΜͩͷ͔ ݁ՌͲ͏͍ͬͨγεςϜΞʔΩςΫνϟʹҭͬͨͷ͔ 5
  6. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. AndApp ঺հ 6

  7. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. AndApp ⁃ DeNA

    ͕ఏڙ͢Δ PC ޲͚ϓϥοτϑΥʔϜ - ̍ͭͷΞϓϦΛ֎Ͱ͸εϚϗɺՈͰ͸ PC Ͱ ⁃ ࣄલొ࿥౳͓ͯ͠Γ·͢ͷͰੋඇ - https://www.andapp.jp 7
  8. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ࣄྫ঺հ 8

  9. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ʙGAE/Go ܾఆ·Ͱ 9

    ࣄྫ঺հ
  10. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. GAE/Go ʹৼΓ੾ͬͨͱ͖ͷ։ൃঢ়گ ⁃

    ϑϧϚωʔδυͰͷӡ༻޻਺࡟ݮΛ໨ࢦͯ͠ GCP ར༻Λߟ͑ͯͨ ⁃ ϑϧϚωʔδυαʔϏε͸ॳΊͯ (ࠓ·Ͱ͸ΦϯϓϨ, AWS(EC2)) ⁃ ઌߦͯ͠ GKE/Go, GAE/Java, GAEFE/Perl Ͱ։ൃத(ࡁ)ͷ service ͋Γ ⁃ 3ϲ݄ޙʹύʔτφʔ༷ʹ৽نγεςϜΛఏڙ͢Δ - ৽ن௥Ճͷઃܭظؒͱͯ͠ 2 िؒ΄Ͳ࣌ؒ͋Γ - αʔό։ൃऀ͸ͦͷ࣌఺Ͱ 15 ਓ΄ͲΞαΠϯࡁΈ 10
  11. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. 11 ར༻ͨ͠ΞʔΩςΫνϟɾ ݴޠ͕͹Β͹Β

    ઌߦͯ͠࡞͍ͬͯͨ service ͷ໰୊఺ ("&+BWB ("&'&1FSM (,&(P
  12. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ར༻ͨ͠ΞʔΩςΫνϟɾݴޠ͕͹Β͹Β ։ൃํ๏ɺӡ༻ํ਑ɾࢿྉͳͲ͕·ͱ·ΓͣΒ͍ ⁃

    ඼࣭ΛकΔͨΊͷ࡞ۀʹଟ͘ͷਓһ͕͔͞ΕΔ͜ͱʹͳΔ ⁃ GCP(ϑϧϚωʔδυ) ࣗମॳͰ͋ΔͨΊɺࢼߦࡨޡ͕͋Δ͸ͣɻ
 มԽ͕͋ͬͨࡍʹɺ͢΂ͯʹద༻͍͔ͯ͠ͳ͚Ε͹ߦ͚ͳ͍ ਓͷྲྀಈੑʹ͔͚Δ ⁃ ΞʔΩςΫνϟ΋ݴޠ΋ҟͳΔͨΊɺαϙʔτΛཔΉࡍʹֶश޻਺͕͔͔Δ 12
  13. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. 13 ΞʔΩςΫνϟɾݴޠΛҰͭʹ

  14. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ΞʔΩςΫνϟɾݴޠΛҰͭʹ ஌ࣝͷڞ༗ ⁃

    ୭͔͕ϋϚͬͯ΋୭͔͕ղܾ͍ͯ͠Δ ⁃ Ͳ͏͢Δ΂͖͔೰ΜͩΒଞͷਓͱ૬ஊͰ͖Δ ϥΠϒϥϦͷڞ༗ ⁃ ڞ௨ϥΠϒϥϦ͸࣮֬ʹඞཁʹͳΔ ⁃ ผݴޠͩͱҠ২ίετ͕ൃੜ͢Δ ਓͷྲྀಈੑΛߴΊΔ ⁃ ୭͔ॿ͚ͯʔ͕ग़དྷΔ ⁃ τϥϒϧγϡʔςΟϯά͕ΈΜͳͰڠྗͰ͖Δ 14
  15. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ݕ౼ͨ͠γεςϜ GKE/XXX ➖

    IaaS Ͱ͋Δ͕Ώ͑ʹϓϩηε؅ཧɾӡ༻ΛͲͷΑ͏ʹ͢Δͷ͔͸֤ར༻ऀଆ͕ Ұఆߟ͑Δඞཁ͕͋Δ GAEFE/XXX ➕ ׳Ε͍ͯΔ Perl / Ruby Ͱ։ൃ͍ͨ͠ͱ͍͏ཁ๬͕͋ͬͨ ➖ ͦΕͧΕͷϓϩάϥϜͷϥϯλΠϜ͕ଘࡏ͠ͳ͍ͨΊɺࣗલͰ࡞Βͳ͚Ε͹͍ ͚ͳ͍΋ͷ͕Ұఆଘࡏ͢Δ ➖ ݱঢ়ͩͱਖ਼௚ GAE ͱ͍͏ΑΓ΋ GCE/GKE ͱಉ͡ IaaS GAE/Java ➕ GAESE Ͱ͋Γɺ͔ͭ Web Ͱͷ஌ݟ͕Ұ൪ଟ͘ଘࡏ͍ͯ͠Δ ➖ ݴޠ࢓༷తʹߏ੒͕Ͱ͔͘ͳΓ͕ͪͰ͋Δ 15
  16. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ٕज़બఆ 16 GAE/Go

  17. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. GAE/Go GAE ඪ४αϙʔτ

    ⁃ GCS / BigQuery ͳͲ GCP ίϯϙʔωϯτͱͷ݁߹͕༻ҙ εέʔϧͳͲؚΊͯϑϧϚωʔδυ ଞࣾͰͷར༻࣮੷ͷᷚ͋Γ γϯϓϧͳߏ੒Ͱ͔͚Δ ⁃ ϝΠϯϩδοΫʹूதͰ͖Δ ⁃ ίϯϙʔωϯτຖͷಛघߏ੒͕͋·Γ࡞ΒΕͳ͍ͷͰɺֶशίετ͕௿͘ͳ Δ 17
  18. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ʙGAE/Go ͷ։ൃ͕࢝·Δ·Ͱ 18

    ࣄྫ঺հ
  19. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ४උ Ұ൪ૣ͍ઃܭ·Ͱ2िؒ΄Ͳ༛༧͋Γ PortalSite

    (GAEFE/Perl) Λ GAE/Go Ͱ࡞Γ௚͢ ⁃ ϋϚϦϙΠϯτͷ೺Ѳ ⁃ ৽ن service ͷ࡞Γํͷࢀߟͱͯ͠ ⁃ εϜʔζͳ։ൃ͕ग़དྷΔΑ͏ͳඞཁ࠷௿ݶͷ४උ 19
  20. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ※ ͳΜͰ࡞Γ௚ͨ͠ͷʁ PortalSite

    ͸ࠓޙਐԽ͍ͯ͘͜͠ͱ͕Θ͔͍ͬͯͨ ⁃ ͦͷࡍʹҧ͏ΞʔΩςΫνϟΛબ୒͍ͯ͠Δͱਓͷྲྀಈੑ͕࡟͕Εͯ͠·͏ ࣮ࡍʹಈ͍͍ͯΔ΋ͷͩͬͨ ⁃ ઃܭ͕࣌ؒͳ͘ɺεϜʔζʹσϑΝΫτΛ࡞ΕΔ ΈΜͳͰϋϚΔͱඇޮ཰ͳͨΊɺ·ͣ͸̍ਓͰΨοπϦ ΍Δ ※ ͦͷޙ GKE/Go GAE/Java ʹ͍ͭͯ΋࡞Γ௚͠ 20
  21. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ʙγεςϜ࢓্͕Γ 21 ࣄྫ঺հ

  22. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. 20 Ҏ্ͷ services

    22 Portal  Web Cer,ficate Client User Token Connect Product Transac,on Dashboard No,fica,on Payment Accoun,ng CrashReport Applica,on Adver,sement Analy,cs Generic  Token Metadata Signer OPE Sta,c  Resource  Proxy Google  Front  End ※  ·֦ͩେத
  23. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. 20 Ҏ্ͷ services

    ߏ੒ ⁃ ಺෦௨৴ଟ༻ ⁃ ΞʔΩςΫνϟతʹ GAE ʹ߹ͬͯͳ͍΋ͷ΋ GAE ʹৼΓ੾ͬͨ • ※ GAE/Go ͷ RSA ॲཧʹ೉͋ΓͰɺ̍ݸ͚ͩ GAE/PHP Λ࢖ͬͯΔ ઃఆ ⁃ basic scaling ⁃ CPU ό΢ϯυҎ֎͸ instance type B2 • ։ൃ؀ڥͰ͸ B1 / max_instance:1 23
  24. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ʙݱঢ়Ͱͷ·ͱΊ 24 ࣄྫ঺հ

  25. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ݱࡏ·Ͱͷ݁Ռ·ͱΊ ։ൃޮ཰ ⁃

    Perl/Ruby ΛϝΠϯʹ࢖͍ͬͯͨͷͰݴޠҠߦίετ͸ൃੜ ⁃ γϯϓϧͳߏ੒ͷͨΊɺҰ౓ॻ͍ͯΈΔͱͦΕҎ߱ಛʹ໰୊ͳ͠ ⁃ ݸਓ༻ͷ։ൃ؀ڥΛߏஙͰ͖ΔͳͲ(Datastore͸ڞ༻)ޮ཰্͕͕ͬͨ Πϯϑϥ޻਺ ⁃ App deploy ͚ͩͰ৽͘͠ service Λ্ཱͪ͛ΕΔͷͰ͘͢͝ḿͬͨ ⁃ جຊతʹΠϯϑϥͱ͔͸ҙࣝͤͣɺϩδοΫʹूதͰ͖ͨ ⁃ GAE ͷجຊ௨Γʹ࡞͓͚ͬͯ͹ɺεέʔϦϯά΋উखʹͯ͘͠ΕΔɻ ϓϩδΣΫτޮ཰ ⁃ service ؒͷਓͷҠߦ͕༰қͰϑϨΩγϒϧͳ։ൃܭը͕Մೳ 25
  26. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ࠓޙ 26

  27. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ࠓޙ 1VC4VC %BUBqPXͳͲΛͲΜͲΜར༻͍ͯ͘͠

    ⁃ ઃܭͷෆ׳Ε΋ग़ͯ͠·͏ͨΊɺ
 جຊతʹ͸ࠓ·Ͱͱಉ༷ʹ࢖͑ΔΑ͏ͳߏ੒Λऔͬͨ ⁃ TaskQueue Λ༻͍ͨඇಉظॲཧɻॲཧͷΩοΫ Computing ෦໳Ͱ͸ GAE/Go ͕࠷ળͷબ୒ͩͱࢥ͍ͬͯΔ ⁃ ҰํͰ GAE Ͱղܾग़དྷͳ͍Α͏ͳ΋ͷ΋ग़ͯ͘Δ(ConnectionషΓଓ͚ͱ ͔) ⁃ ͕ͨͬͯ͠ GKE ͳͲͷબ୒ࢶ΋ࠓޙ͔ͬ͠Γษڧ͍͔ͯ͠ͳ͚Ε͹͍͚ͳ ͍͸ͣ 27
  28. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. 28