PHPConference_LT_PHPでGoogleCloudSpannerをつかってみる

 PHPConference_LT_PHPでGoogleCloudSpannerをつかってみる

PHP Conference 2017
LT発表資料
PHPでGoogle Cloud Spannerをつかってみる
です

Ec2fcdc4ea7905b289967a2c4c43e154?s=128

CyberAgent SGE Engineer

October 08, 2017
Tweet

Transcript

  1. 1)1Ͱ (PPHMF$MPVE4QBOOFSΛ ͔ͭͬͯΈΔ גࣜձࣾαΠόʔΤʔδΣϯτɹനҪɹӳ  QIQDPOQIQDPO

  2. • גࣜձࣾαΠόʔΤʔδΣϯτ • 4(&౷ׅຊ෦ٕज़౷ׅࣨ$50 • നҪɹӳ • ΤϯδχΞ • 5XJUUFS

    !HPPEPP • #MPH IUUQBNFCMPKQHPPEPP • %2 ͙ͪ͢Ή '# ϓΫϦϙ ཱྀܳਓ  ͓લɺ୭Α
  3. ηογϣϯࢿྉ͸ͷͪ΄Ͳެ։͠·͢ɻ ࣸਅࡱӨ͸ߏ͍·ͤΜ͕ɺҎԼΛक͍ͬͯͩ͘͞ γϟολʔԻΛফڈ͢Δ
 ޙΖͷํͷअຐΛ͠ͳ͍

  4. "HFOEB w(PPHMF$MPVE4QBOOFSͱ͸ w1)1ͷରԠঢ়گ wαϯϓϧΞϓϦέʔγϣϯ w·ͱΊ

  5. (PPHMF$MPVE 4QBOOFSͱ͸

  6. w ஍ٿن໛%#ɿେ཮ɾϦʔδϣϯؒࣗಈϨϓϦΧ w εέʔϧɿΦʔτγϟʔσΟϯά w μ΢ϯλΠϜͳ͠ɺ4-"
 (PPHMFͷ ϦϨʔγϣφϧσʔλϕʔεαʔϏε

  7. wάϩʔόϧͳεέʔϥϏϦςΟ wϑϧϚωʔδυ wϦϨʔγϣφϧηϚϯςΟΫε wτϥϯβΫγϣϯͷ੔߹ੑ wߴՄ༻ੑ 4QBOOFSͷಛ௃ 引用:https://cloud.google.com/spanner/ ɿϊʔυ͕̍୆͔Β਺ઍ୆·Ͱ ɿϨϓϦέʔγϣϯͱϝϯςφϯε͕ࣗಈ ɿεΩʔϚɺ42-ΫΤϦ

    "/4*  ɿڧྗ͔ͭάϩʔόϧ ɿ
  8. ઃܭɺύϑΥʔϚϯεͷ࿩͸ ҎԼͷࢀߟจݙ΁ https://www.slideshare.net/ HammoudiSamir/cloud-spanner-78081604 https://www.slideshare.net/ ssuserc49633/20170822-cloud-spanner

  9. 1)1ͷରԠঢ়گ

  10. ެࣜϗʔϜϖʔδΛ ΈͯΈΔͱɾɾɾ

  11. ӳޠ൛ʹ͋ͬͨɾɾɾ https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/spanner νϡʔτϦΞϧιʔε͸ͪ͜Β

  12. (PPHMF$MPVE4QBOOFS༻ 1)1ͷϥΠϒϥϦ͸ʁ

  13. IUUQTHPPHMFDMPVEQMBUGPSNHJUIVCJPHPPHMFDMPVEQIQEPDTDMPVETQBOOFS MBUFTUTQBOOFSTQBOOFSDMJFOU

  14. DPNQPTFSͰ͸͍Δ ͨͩ͠ɺH31$1)1&YUFOTJPO͕ඞཁ $ pecl install grpc

  15. αϯϓϧΞϓϦέʔγϣϯ

  16. #PPLTIFMGΞϓϦ

  17. (PPHMF͕༻ҙͨ͠νϡʔτϦΞϧ༻ΞϓϦ https://github.com/GoogleCloudPlatform/getting-started-php σʔλετϨʔδͱͯ͠ w%BUBTUPSF w.POHP%# w.Z42- w1PTUHSF42- ʹରԠ͍ͯ͠Δ

  18. 4QBOOFSରԠ൛Λ ͭ͘Γ·ͨ͠

  19. https://github.com/shirai-suguru/getting-started-php ˞PQUJPOBMDPNQVUFFOHJOFͷষ͔͠ରԠ͍ͯ͠ͳ͍Ͱ͢

  20. .Z42-ͱ࢖͍উखΛ ͘Β΂ͯΈΔ

  21. 4&-&$5 όΠϯσΟϯά ݁Ռηοτͷૢ࡞

  22. 4&-&$5͸ɺ΄΅ಉ͡

  23. 61%"5& ओΩʔΛؚΉ࿈૝഑ྻͰ มߋσʔλΛҾ਺ʹઃఆ ओΩʔΛ ,FZ4FUܕͰ Ҿ਺ʹઃఆ %&-&5&

  24. 61%"5& %&-&5&͸ ओΩʔΛࢦఆͯ͠ͷมߋͷΈ

  25. 42-ͷ8)&3&۟Ͱࢦఆͨ͠ ৚݅ʹҰகͨ͠ߦͷมߋ͸ 61%"5& %&-&5&͚ͩͰ͸ ࣮ݱͰ͖ͳ͍

  26. 42-ͷ8)&3&۟Ͱࢦఆͨ͠ ৚݅ʹҰகͨ͠ߦͷมߋ͸ Ұ౓4&-&$5ͯ͠ ओΩʔΛऔಘͯ͠ 61%"5& %&-&5&͢Δ

  27. */4&35 τϥϯβΫγϣϯ */4&35

  28. "650@*/$3&.&/5͕ͳ͍ ˞4QBOOFSͰ͸Ξϯνύλʔϯ ϗοτεϙοτʢαʔόͷภΓʣ͕ൃੜ͢ΔͨΊ

  29. "650@*/$3&./5 ʹ͋ͨΔॲཧ

  30. τϥϯβΫγϣϯͷѻ͍஫ҙ

  31. σϑΥϧτͷઃఆ͸ τϥϯβΫγϣϯதͷॲཧ  SVO5SBOTBDUJPO಺ͷؔ਺ ͕ ࣦഊͨ͠ΒϦτϥΠ͞ΕΔ

  32. ෳ਺ճ࣮ߦ ͯ͠΋ େৎ෉͔ʁ ͜ͷιʔε͸/(

  33. ͜ͷιʔε͸ ͨͿΜ 0, .Z42-ͷ POEVQMJDBUFLFZVQEBUF ʹ͋ͨΔॲཧ

  34. .Z42-ʹൺ΂Δͱ ࢖͍উख͕ɾɾɾ 1%0΄͍͠Ͱ͢ΑͶ

  35. 4QBOOFS༻1%0Λ ͭͬͯ͘Δ్த ؒʹ߹Θͳ͔ͬͨ

  36. ·ͱΊ

  37. w4QBOOFS͸ϑϧϚωʔδυͷεέʔ ϥϒϧͳ3%#.4 w1)1͔ΒͰ΋ѻ͑Δ wαϯϓϧΞϓϦΛੋඇͭͬͯ͘Έͯʂ wτϥϯβΫγϣϯ஫ҙɺบ͕͋Δ w1%0ͭͬͯ͘·͢

  38. w ௒࣮ફ$MPVE4QBOOFSઃܭߨ࠲ - https://www.slideshare.net/HammoudiSamir/cloud-spanner-78081604 w ී௨ͷΤϯδχΞ͕ʲ$MPVE4QBOOFSʳ࢖ͬͯΈͨ - https://www.slideshare.net/ssuserc49633/20170822-cloud-spanner w (FUUJOH4UBSUFEXJUI$MPVE4QBOOFSJO1)1

    - https://cloud.google.com/spanner/docs/getting-started/php/ w $POUBJOFS&OHJOFͰͷ1)1#PPLTIFMGͷ࣮ߦ - https://cloud.google.com/php/tutorials/bookshelf-on-compute-engine w (PPHMF$MPVE$MJFOU-JCSBSZGPS1)1 - https://googlecloudplatform.github.io/google-cloud-php/#/docs/cloud- spanner/latest/spanner/spannerclient ࢀߟจݙ XFC
  39. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠