How to analyze the use of Yar parallel RPC Framework
Today, I will talk to you about how to analyze the use of Yar parallel RPC framework, which may not be well understood by many people. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.
Foreword:
RPC, the abbreviation of Remote Procedure Call, translates into Chinese to mean remote procedure call.
Two issues to be solved by RPC:
Solve the problem of invocation between services in distributed systems.
When calling remotely, it should be as convenient as local calls, so that callers are not aware of the logic of remote calls.
If you mimic the invocation method of the BBPOS architecture, you need to write a string of code that initiates the http request each time you call it. Such as new Curl (). Can you initiate a remote call like a local call, so that the user is not aware of the process of the remote call?
In fact, RPC rarely uses http protocol for data transmission. After all, I just want to transfer data, so there is no need to use an application layer protocol for text transmission. Why not just use binary transport.
Installation: $pecl install yar$ pecl install msgpack
Server code: