Recently saw Jsonrpc, a little understanding of the next RPC, but the Internet to see the information is basically repetitive, and really do not understand. I would like to ask a few questions:
What is the difference between RPC and HTTP requests, what are the advantages, and how efficient
Whether the app (iOS, andriod) supports RPC, the threshold is not high
RPC with the framework or the original project integration has some difficulty, whether it is worth
Reply content:
Recently saw Jsonrpc, a little understanding of the next RPC, but the Internet to see the information is basically repetitive, and really do not understand. I would like to ask a few questions:
What is the difference between RPC and HTTP requests, what are the advantages, and how efficient
Whether the app (iOS, andriod) supports RPC, the threshold is not high
RPC with the framework or the original project integration has some difficulty, whether it is worth
RPC Full name all know, Remote Procedure Call
remote procedure call, the tongue of the tongue.
The simple understanding is as follows:
Your computer (client) wants to call a function on the server to achieve your purpose.
rpc
I think it's a protocol application, but a http
protocol.
Application is based on protocol, so there is a rpc
way to apply it is called
HTTP-based RPC implementations.
So rpc
http
What are the advantages compared to ordinary requests?
The data structure of the normal HTTP request is simple, then stateless, does not maintain a long connection, and because it http
contains one header
, it will transmit several bytes more, resulting in the optimization is not extreme.
If your service is not care of these, then you rpc
can completely based on the http
implementation, after all, the existing protocol is simple to use.
The app is certainly supported rpc
, because they all support the common TCP/IP
protocol stack.
Integration has a certain difficulty can only be said to be their own rpc
solution to the problem of choice.
I have no recommendation, I like what to choose.
Hard to recommend, recommend Bird Brother'syar