cause
Back to earth for a raise
This note is only a summary of work and study. If you have any questions, you can leave a message for communication and exchange learning
Introduction to grpc
- RPC framework based on http2.0 protocol
- Multilingual support
- Defining services based on protobuf
PHP needs to install extensions
Introduction to protobuf
- Compared with XML and JSON formats, protobuf is smaller, faster, more convenient and has high transmission performance
- Multilingual support
When using protobuf’s tool protoc, you need to install the PHP extension package
summary
For PHP, there are several problems:
- Grpc+protobuf can only be used as a client and not a server for PHP
- PHP extensions (grpc) and composer packages (grpc and protobuf) need to be installed
- The grpc code generated by protocol for PHP requires protocol to install the extension, and windows cannot implement it
- Due to the strong type differences of other languages, the parameters during transmission are basically implemented through class methods, and the classes generated by protobuf are converted
It is convenient for go, and there is nothing complicated
This work adoptsCC agreement, reprint must indicate the author and the link to this article