Get to know RPC, Why was it born RPC, and HTTP What's the difference ?

Opening question

  1. What is? RPC?
  2. Why RPC, What problem to solve ?
  3. RPC And HTTP What's the difference ?
  4. You know how many RPC?

know RPC

RPC:Remote Procedure Call, Remote procedure call . It means that the computer program makes the process in different address space ( Usually on another computer on a shared network ) Execution time , It's encoded like normal ( Local ) Procedure call , Without the programmer explicitly coding the details for remote interaction .

RPC It's a kind of server - client (Client/Server) Pattern , The classic implementation is a way to do it through Send a request - Accept the response A system for information exchange .

RPC Is interprocess communication (IPC) A form of , Because different processes have different address spaces : If it's on the same host , Even if the physical address space is the same , They also have different virtual address spaces ; If they're on different hosts , The physical address space is different . Many different ( It's usually incompatible ) Technology has been used to implement this concept .

【 Simple understanding 】: Two different computers ( Program ), Computer A There is one Agreement , Computer B Want to call Computer A Need to pass through Agreement To make a communication call .

RPC The birth of

In fact as early as 1982 About years ago RPC It's used by people to communicate with distributed systems , The earliest invention 『 Remote procedure call 』 The person who uses this word is 『 Bruce · jay · Nielsen (Bruce Jay Nelson)』 About it. 1981 year .

We're familiar with Java stay 1.1 Version provides Java Version of RPC frame (RMI), At this time in 1990 After year , Basically RPC It is widely used in system to system calls . But only in the back end , For the public, more contact is still needed HTTP Such agreement , Therefore RPC Let the public know more about cognition later .

RPC And HTTP

Let's start with HTTP

HTTP:Hypertext Transfer Protocol Hypertext transfer protocol .

HTTP The agreement 1990 It only began to appear as a mainstream agreement in 1997 ; The reason why they are known to us , Because usually HTTP be used for web End , That is to say web The browser and web Server interaction . When ajax and json When the front end is popular ,json And it's starting to play its part , Simplicity and ease of use make json Become the mainstream choice of front and back end data transmission .HTTP In the agreement Restful Specification as representative , It has a lot of advantages . it Good readability , And You can get Firewall support 、 Cross language support .

HTTP The shortcomings of the new technology are soon exposed :

  1. Less useful information ,HTTP stay OSI The seventh floor , It contains a lot of HTTP First class information
  2. Low efficiency , Because of the seventh floor , There are a lot of layers in the middle
  3. HTTP agreement Calling remote methods is complicated , Need to encapsulate various parameter names and parameter values, as well as encrypted communication, etc

therefore RPC Good news ?

  1. It's all useful information
  2. Efficient
  3. Easy to call
  4. No need to care about network transmission or communication

HTTP and RPC There's a connection

http It's also rpc A way of doing it .

RPC and HTTP In a word, it's different

RPC It's like a regional dialect , Only the inside knows , Both sides need to know the dialect , Otherwise, we can't communicate

HTTP It's Putonghua , Basically understand , I can also say

RPC It's usually used for ?

stay Microservices 、 Distributed It has become the everyday today , Services are usually deployed on different servers , The servers are also in different regions , At this time, there is a cross region and cross server call problem ,RPC That is to say, it can be used in similar situations .

RPC For internal use of the company , Low performance consumption , High transmission efficiency , Service governance is convenient , But it's not recommended to transfer large text 、 Video etc. .

Questions at the end of the passage

  1. Does it make you understand HTTP and RPC Some of them are different ?
  2. RPC What do you want to do with it ?
  3. You're using RPC Do you ?

Get to know RPC, Why was it born RPC, and HTTP What's the difference ? More articles about

  1. RPC Programming Use RPC Programming is the most powerful tool for reliable communication between client and server entities 、 One of the most efficient methods . It provides the foundation for almost all applications running in a distributed computing environment .

    RPC Programming Use RPC Programming is the most powerful tool for reliable communication between client and server entities . One of the most efficient methods . It provides the foundation for almost all applications running in a distributed computing environment . In this paper, RPC Basic event flow between client and server ...

  2. hug .NET Core, Cross-platform lightweight RPC:Rabbit.Rpc

    A blog post was published not long ago ".NET Lightweight RPC frame :Rabbit.Rpc", At the beginning, it only realized very simple functions , It also lists the plans for the future , After a few days of continuous efforts, and for Rabbit.Rpc Added a wave of new features ...

  3. RPC Principle and RPC The example analysis

    We all wrote a lot of programs in school , For example, write a hello world Service , And then call it locally , As shown below . The characteristic of these programs is that the service consumer and the service provider are local call relations . 1 2 3 4 5 6 public class ...

  4. Network programming -- RPC Realization principle -- RPC -- Iteration version V1 -- Local method call

    Network programming -- RPC Realization principle -- Catalog La la la V1——RPC -- Local method call : Not through the Internet introduction 1. RPCObjectProxy rpcObjectProxy = new RPCObjec ...

  5. Network programming -- RPC Realization principle -- RPC -- Iteration version V2 -- Local method call Integrate Spring

    Network programming -- RPC Realization principle -- Catalog La la la V2——RPC -- Local method call + Spring 1. To configure applicationContext.xml file Inject bean And management bean ...

  6. Network programming -- RPC Realization principle -- RPC -- Iteration version V3 -- Remote method call Integrate Spring

    Network programming -- RPC Realization principle -- Catalog La la la V3——RPC -- Remote method call And null The transmission of + Spring Service provider : 1. To configure rpc03_server.xml Inject Services provide ...

  7. Network programming -- RPC Realization principle -- RPC -- Iteration version V4 -- Remote method call Integrate Spring Automatic registration

    Network programming -- RPC Realization principle -- Catalog La la la V4——RPC -- Remote method call + Spring Automatic registration Service provider : 1. To configure rpc04_server.xml Inject Service provider rpc ...

  8. Open source realizes a .net rpc frame - Machete.Rpc

    Machete.Rpc Machete.Rpc It's a lightweight Rpc( Of a remote procedure call ) frame . The underlying agent uses Emit Improved efficiency , The underlying communication uses DotNetty Framework to improve the efficiency of communication . At present, it is gradually improving . G ...

  9. C# -- High performance RPC frame :Socean.RPC

    brief introduction Socean.RPC It's a .Net High performance in the future RPC frame , Framework with high performance . High stability as the goal , Bottom based socket, No third party library references , The code is concise , The total amount of code is about 2000 That's ok , The framework has high performance , In general PC Up test , Long ...

  10. Distributed thinking and rpc Solution Introduction

    1.RPC The birth of RPC(Remote Procedure Call) Remote procedure call , Through this rpc agreement , Call a service on a remote computer , It's like calling a local service . Different services are deployed on different machines , And after starting up, in ...

Random recommendation

  1. [ turn ]AS3 int uint Number

    from :http://luhantu.iteye.com/blog/1910301 AS3 int uint Number Blog classification : AS3 flex number type   1) int Class can be used to represent ...

  2. xlrd Read multiple excel Spreadsheet data

    import sys import xlrd import traceback def ReadData(FileName): try: workBook = xlrd.open_workbook(F ...

  3. POJ 3107 Godfather ( Tree form dp)

    Topic link Although the subject is not difficult , however 1A It's still cool , I'm just beginning to understand the wrong meaning , For a long time . And it's said that this question uses vector Will timeout , After watching it, I'd better use adjacency . The question : Give a tree , The guarantee is a tree , Find the inner section of the connection block after removing a point ...

  4. Python Development 【 Chapter one 】Python The ornament of the foundation

    Write code to follow the principle of closed development , Although in this principle is the use of object-oriented development , But it also applies to functional programming , Simply speaking , It stipulates that the implemented function code is not allowed to be modified , But it can be expanded , namely : closed : The implemented function code block is open : For extension development #s2 ...

  5. :gAudit

    http://www.doc88.com/p-0794369847693.html http://baike.baidu.com/link?url=pcOUfBpILuEAPFrBSsSU-6Vzg3 ...

  6. Servlet Application development -- filter

    3 Kind of servlet: Simple Servlet, Filter Servlet, monitor Servlet 1. Simple Servlet: It is preserved as a necessary development structure for a program . 2. Filter Servlet: The filter doesn't use Http ...

  7. zhaopin Zhuo pin IM Evolution

    1.   Zhuo pin IM Development background Zhilian Zhuoping is a high-end talent recruitment platform of Zhilian , Set up fast 4 Years. , Business growth is increasing every year with 100% Speed up , Business growth is fast, and the speed of development and online is also relatively high . 2016 year 6 Month proposed IM Development requirements ,7 On line at the beginning of the month , Developer ...

  8. iOS Development --SQLite Important framework FMDB Use

    What is? FMDB: FMDB It is a harmony. iOS Of SQLite Third party framework related to database operation . Mainly C Language operation database code with OC It was packaged . Users only need to call the API Can be used to create and connect to a database , Create table , Query etc. . ...

  9. Section 16 : EF Of CodeFirst Mode through Fluent API Modify the default agreement

    One . brief introduction 1. priority :Fluent API > data annotations > default conventions. 2. be-all Fluent API The configuration should be in OnMode ...

  10. antd-vue Load plug-ins on demand babel-plugin-import Report errors

    Report errors .bezierEasingMixin(). Baidu is Less The reason why the version is too high , I'm crazy about it , There are too many new ones ... resolvent : take less Version down to 3.0 following Because I use npm Generated vue project . therefore cmd life ...