PHPでgRPCって どこまでいけるの?

PHPでgRPCって どこまでいけるの?

PHPConferenceTokyo2019のLT発表資料です

近年、マイクロサービスの流行とともにプロトコルとして
gRPCが使われるのをよく目にします
PHPでgRPCを使おうと思ったとき、他の言語できるけれど
PHPでできないことはあるでしょうか?
Swooleを用いて、gRPCサーバを検証してみました

Ec2fcdc4ea7905b289967a2c4c43e154?s=128

CyberAgent SGE Engineer

December 01, 2019
Tweet

Transcript

  1. 2.

    • גࣜձࣾαΠόʔΤʔδΣϯτ • 4(&౷ׅຊ෦ٕज़౷ׅࣨࣨ௕ • ࢠձࣾࣾ$50 • גࣜձࣾ$SBGU&HH • גࣜձࣾαϜβοϓ

    • നҪɹӳ • ΤϯδχΞ • #MPH IUUQBNFCMPKQHPPEPP ͓લɺ୭Α • 5XJUUFS !HPPEPP • %2 ͙ͪ͢Ή '# 
 ϓΫϦϙ ཱྀܳਓ
  2. 14.
  3. 18.
  4. 21.

    ͕

  5. 22.

    (PPHMFάϧʔϓͷ΍ΓͱΓ It appears as of right now you can only

    create CLIENTS in PHP, but not servers. I was wondering what the technical blockers behind this were and if it's on the roadmap for a future release? Ҿ༻ɿhttps://groups.google.com/forum/#!topic/grpc-io/F3IyYaI_6S0 (ҙ༁)PHPͰ͸gRPCͷΫϥΞϯτ͸࡞ΕΔ͚ Ͳɺαʔόʔ͸࡞Ε·ͤΜɻকདྷతͳϩʔυ Ϛοϓ͋Γ·͔͢ʁ
  6. 23.

    (PPHMFάϧʔϓͷ΍ΓͱΓ Ҿ༻ɿhttps://groups.google.com/forum/#!topic/grpc-io/F3IyYaI_6S0 There are several problems with the idea of

    a gRPC server in PHP, and we have no plans for that. Basically, the only way it would work, is if you run PHP "naked", without its typical nginx or apache frontend. (ҙ༁)PHPͷgRPCαʔό͸͍͔ͭ͘໰୊͕͋Γɺղ ܾํ๏͕ݟ౰ͨΓ·ͤΜ جຊతʹɺ།Ұͷํ๏͸ɺnginx·ͨ͸Apacheͷϑ ϩϯτΤϯυͳ͠ʹ”ૉ”ͷPHPͰಈ͔͢͜ͱͰ͢
  7. 37.
  8. 41.