P4L1 - Remote Procedure Calls Flashcards
What is the purpose of RPC?
- To remove boilerplate
- To hide cross-machine complexities
- To decouple the communication protocol from the procedure-call logic. (You can focus on what the cross-machine function does and not how it communicates)
List the benefits of RPC
- Offers a high-level interface for data movement and communication
- Handles a lot of the errors that may arise from low-level communication/transmission interactions
- Hides complexities of cross-machine interactions
T/F: By default, RPCs have asynchronous call semantics
False, RPCs have synchronous call semantics
T/F: RPC is meant to be more than a transport-level protocol and it should support different types of protocols (UDP,TCP or others)
True!
Describe the high level structure of RPC
Client sends a request to perform some operation which the server has implemented. Server calls implementation of the operation and returns the result to the client
Describe steps of RPC
- Register - server “registers” procedure, arg types, location…
- Bind - Client finds and “binds” to the desired server
- Call - Client makes RPC call; control passed to client stub
- Marshall - Client stub “marshals” arguments into buffer
- Send - Client sends messages to server
- Receive - Server receives message; passes to server-stub
- Unmarshal - Server stub unmarshals the args
- Actual Call - Server stub calls local procedure
- Result - Server performs operation and computes result
T /F: When using RPC, the client and server don’t need to be developed together
True!
RPC systems rely on the use of ____ ____ ____ which serve as a protocol of how the client-server agreement will be expressed
Interface Definition Languages (IDL)
T/F: An RPC system can use an IDL that is language-agnostic
True
What is the purpose of the IDL
It is used to define the interface. It helps the RPC system generate stubs and to generate information that is used in the service discvoery process
T/F: The IDL is used for the implementation of the service
False!
_____ is the mechanism used by the client to determine which server to connect to, based on the service name and the version number
Binding
To support binding, there needs to be some systems software that maintains a database of all available services, known as ____
registry
A registry is essentially the _____ _____ for the services
yellow pages
T/F: Pointers are able to be used in RPC
If configured, the REFERENCED data can be copied instead of the pointers during marshalling