Network Abstractions: Remote Procedure Calls
In this lesson2 sections
Network Abstractions: Remote Procedure Calls
RPCs present remote operations through a function-like interface. They can hide serialization and network transport, but the application must still decide how long to wait, which failures to report, and whether retrying an operation is safe.
What is an RPC?
A Remote Procedure Call (RPC) lets a program invoke a routine in another process, often on another machine. RPC frameworks define how requests and responses are represented and carried over a transport. The function-call interface is an abstraction over that communication, not a guarantee that a remote call behaves like a local one.
Note: Similar call syntax does not imply similar failure behavior. The network may fail while the server continues working.
How does RPC work?
In the synchronous example below, the calling thread waits for the result. Arguments are serialized and sent to the server; the response returns through the same layers. The call can also end with an error or deadline expiration. RPC frameworks may offer asynchronous and streaming interfaces as well, but this example follows one request and one response.
The rest of this lesson is for Premium members
Premium opens every lesson in this course, along with all questions and solutions on PracHub.