Abstractions Flashcards
What is a remote procedure call (RPC)?
An RPC is an interprocess communication protocol widely used in distributed systems.
In which layers of the OSI model does RPC operate?
RPC spans the transport and application layers.
What does RPC hide from developers?
RPC hides the complexities of packing and sending function arguments to the remote server, receiving return values, and managing network retries.
How does the RPC mechanism work?
The calling environment is paused, parameters are sent over the network, and results are returned to resume execution.
What are the five main components involved in an RPC program?
- Client
- Client stub
- RPC runtime (client side)
- Server
- Server stub
- RPC runtime (server side)
What is the role of the client stub in an RPC?
The client stub converts parameters into a standardized format and packs them into a message.
What does the RPC runtime at the client do?
It delivers the message to the server over the network and waits for the result.
What is the responsibility of the server stub in the RPC process?
The server stub unpacks the message, extracts parameters, and calls the desired server routine.
What happens after the server routine is executed?
The result is returned to the server stub, packed into a message, and sent back to the client.
What is a key advantage of using RPC in back-end services?
RPC provides high performance and a simple abstraction of calling remote code as local functions.
What open-source framework has Google developed that uses RPC?
gRPC.
How does Uber utilize RPC?
Uber uses RPC for real-time location tracking, ride matching, and communication between drivers and riders.
What technology does Facebook use for RPC?
Facebook uses Thrift for RPC.
Fill in the blank: The RPC method is similar to calling a local procedure, except that the called procedure is usually executed in a _______.
[different process and on a different computer]
What is the main benefit of using RPC for developers?
Developers can focus on design aspects instead of network communication details.
True or False: RPC allows for interoperability between different programming languages.
True.
workflow of RPC