On the micro-services architecture of RPC framework?

RPC Introduction

The first official to tell you a few words: RPC is an abbreviation Remote Procedure Call (Remote Procedure Call) is. SAP system RPC call display principle is very simple, there are some similar to the three-tier architecture of C / S system, third-party clients via a standard interface calls internal SAP or custom function, the function returns the data obtained after processing or print.

Glossary: ​​Remote Procedure Call remote procedure call

Glossary: ​​When backstage provider method, during the execution of the business background of consumer remote procedure call.

Definition: distributed systems communicate between the systems called RPC, a remote procedure call. Without paying attention to the specific communication protocol details. RPC tool can be used direct access remote server data.

The talk is cooked through:

  1. Local call a function method;

  2. RPC local machine frame to encapsulate the call information (function call, the parameters, etc.), after serialization (JSON, XML, etc.), is sent to the remote server through the network transmission;

  3. After the remote server receives the call request, the remote machine frame RPC calls to deserialize obtain information, and call information to locate the actual method to be performed in accordance with, After performing this method, the sequence of the execution result, sends an execution result transmitted through the network back to the local machine;

  4. RPC local machine frame deserialization out the results of the functions return the result.

End service calls (local machine): Here Insert Picture Description

The service provider (remote machine): Here Insert Picture Description

Of course, I this there is a special popular argument

"My husband, what is RPC Yeah, why do so many programmers cant!", My wife is, as always curious. "RPC, is Procedure Remote
Call abbreviation Yeah, translated into Chinese is the Remote Procedure Call Well," While I was looking at the book, while casual replied.
"What? You're talking about? I do not know who translated into Chinese What does this mean? You Got Nuthin, Go away to wash the dishes!"
"I went ..." I wake up, I sat across from is not a programmer, in order not to wash the dishes, I instantly mobilize all the brain cells, sea stars in my mind convergence, inspired by the emergence of ......
.
"is the remote procedure call, it is relative to the natural local procedure call is the only thing. "" ah ha, that give his aging mother talk about local procedure call is wisdom? " "
local procedure call, like you're at home, you want to wash the dishes, you direct the bowl in the dishwasher, turn on the switch on the dishwasher can wash up. this is called local procedure call. " "
Ah, I can not do, and that is what the remote procedure call? " "
remote Well, now that you are not at home , with the sisters went to the waves, suddenly found not wash bowl, I called over and told me to wash the dishes, this is the remote procedure call it "easy to understand how to explain, I'm a genius!
.
"Oh! I see," said his wife began to pack bags. "What are you doing to Oh,"
"I? I want to go off to the waves, when will I remember receiving remote calls oh, oh no, let's be professional point, it should be said, when will I remember receiving the RPC oh!"

What do you think, is not more than the ear of those truths! ! !

 

Recommended: Ya group of words

Guess you like

Origin www.cnblogs.com/1994jinnan/p/12592029.html