RPC (remote Procedure call Protocol)-a remoting protocol that requests services from a remote computer program over a network without needing to know the underlying network technology. The RPC protocol assumes that some transport protocols exist, such as TCP or UDP, to carry information data between communication programs. In the OSI network communication model, RPC spans the transport and application tiers. RPC makes it easier to develop applications that include distributed, multi-program networks. RPC takes client/server mode. The requestor is a client, and the service provider is a server. First, the client call process sends a call message with process parameters to the service process, and then waits for the reply message. On the server side, the process stays asleep until the call information arrives. When a call arrives, the server obtains the process parameters, evaluates the result, sends a reply message, and then waits for the next invocation information, and finally, the client invokes the process to receive the reply message, obtains the process result, and then invokes execution to proceed. There are multiple RPC modes and executions. Originally presented by Sun Corporation. The IETF ONC charter re-revised the Sun version, making the ONC RPC protocol an IETF standard protocol. Now using the most common patterns and execution is an open software-based distributed computing Environment (DCE). Working principle (under Windows as an example) when you run a client-to-server RPC call, Its internal operation is roughly the following 10 steps: 1. Call the client handle, execute the transfer parameter 2. Call the Local system core to send network messages 3. The message is delivered to the remote host 4. The server handle gets the message and takes the parameter 5. Execute the remote procedure 6. The procedure that executes returns the result back to the server handle 7. Back to localhost 9. Client handles receive messages from the kernel 10. The customer receives the data returned by the handle
RPC over HTTPMicrosoft rpc-over-http Deployment (RPC over HTTP) allows RPC clients to securely and efficiently connect to the RPC server program over the Internet and perform remote procedure calls. This is done with the help of a middleware called the rpc-over-http agent, or simply RPC Proxy. The RPC agent runs on the IIS computer. It accepts RPC requests from the Internet, performs authentication, validation, and access checks on these requests, and if the request passes all tests, the RPC proxy forwards the request to the RPC that performs the real processingserver. The RPC over HTTP,RPC client does not communicate directly with the server, and they use the RPC proxy as the middleware. The Protocol structure Remote Procedure Call (RPC) Information protocol consists of two different structures: invocation information and reply information. The information flow is as follows: RPC: Remote procedure call Process RPC Call information: Each remote procedure call information consists of the following unsigned integer fields to identify the remote procedure independently: Program Number program version number Number) The RPC call Information body form is as follows: struct call_body {unsigned int rpcvers;unsigned int prog;unsigned int vers; Procedure unsigned int proc;opaque_auth cred;opaque_auth verf;1 parameter2 parameter ...} RPC Reply information: The RPC Protocol's response information changes depending on whether the network server is receiving or rejecting the call information. The reply request includes various information that distinguishes between the following scenarios: RPC successfully executes the invocation information. The remote implementation of RPC is not the second edition of the Protocol and returns the minimum and maximum version numbers supported by RPC. Remote programs are not available in the remote system. The requested version number is not supported by the remote program. Returns the minimum and maximum version numbers supported by the remote program. The requested procedure number does not exist. Usually a caller agreement or program error. The RPC reply information form is as follows: enum Reply_stat stat{msg_accepted = 0,msg_denied = 1};
Remote Procedure Call Protocol (RPC)