RPC is an IPC mechanism that specifies that the processes interact via procedure call interface.
Birrell, Andrew, and Bruce Nelson.
Why RPC?
Benefits of RPC
RPC Requirements
Structure of RPC
Once the result is computed, it will take the reverse path. It will go through the server step that will first create a buffer for that result,
then it will send the response back via appropriate client connection, arriving on the client side into the RPC run time.
the packets will be received. the result will be extracted from those packets by the client side stub, be placed somewhere in memory in the client address space, and ultimately the procedure will return to the client process.
Before that, the client process will be blocked, and the application will be suspended here.
https://zhuanlan.zhihu.com/p/45700301
Steps in RPC
https://www.zhihu.com/question/23995948
目前linux进程间通信的常用方法是什么(pipe?信号量?消息队列?)?
Interface Definition Language
https://www.jianshu.com/p/959030de7f1c
Specifying an IDL
XDR (Sun RPC) Example
Marshalling
The encoding specifies the data layout when it's serialized to the bytee stream, so that anybody that looks at it can actually make sense of it.
Unmarshalling
Binding and Registry
registry => yellow pages
Visual Metaphor
https://blog.csdn.net/qq_18425655/article/details/51955674
面试题:TCP协议与UDP协议的区别
Pointers in RPCs
Handling Partial Failures
RPC Failure Quiz
RPC Design Choice Summary
What is SunRPC?
SunRPC Overview
Sun RPC Documents (maintained by Oracle)
SunRPC XDR Example
Compiling XDR
Summarizing XDR Compilation
To complete the quiz, download the square.x file (if following along with the hints, you will need to rename it to square.x), and run rpcgen!
You can run rpcgen on the Ubuntu VM provided with this class. If you have not setup the Ubuntu VM yet, follow the Ubnutu VM Setup Instructions.
Quiz Errata
There are two issues with the rpcgen commands. First, you should use the following format:
- rpcgen square.x [flags]
And, because the flags may be difficult to read, here are the full commands:
- rpcgen square.x -C
- rpcgen square.x -C -M
SunRPC Registry
SunRPC Binding
XDR Data Types
RFC 4506 (Defines XDR Data Types)
XDR Routines
_freeresult procudure => another user defined procedure => user specifies what are all the different data structures, or pieces of state, that need to be freed up after runtime is done.
Encoding
XDR Encoding
Java RMI