Beginner Topic 8 of 51 Distributed Systems & Cloud
Remote Procedure Calls
Invoking functions on another machine like local ones.
How it works
Remote procedure call lets a program call a function in another process or machine as if it were local. A client stub marshals the arguments into a message, sends it over the network, the server stub unmarshals it, runs the procedure and returns the serialized result. Interface definition languages such as Protocol Buffers with gRPC, Thrift and Cap'n Proto generate stubs, define schemas and support versioning, streaming and deadlines. Semantics include at-most-once, at-least-once and exactly-once delivery attempts.
Where it is used
Microservice communication, internal APIs, distributed databases, cluster managers and mobile back ends use RPC frameworks for efficient, typed communication.
Common pitfall
Hiding the network is dangerous: calls can fail, time out or run twice, and latency is far higher than local calls. Retrying non-idempotent operations duplicates side effects. Version mismatches break clients. Set deadlines and propagate them, make operations idempotent, use retries with backoff and jitter and avoid chatty fine-grained calls.
Where it fits in the course
Remote Procedure Calls is topic 8 of 51 in Distributed Systems & Cloud, rated Beginner. It follows Availability and Reliability. The next topic is Message Queues.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Distributed Systems & Cloud quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Distributed Systems & Cloud quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Remote Procedure Calls?
Where do people use Remote Procedure Calls?
What is the most common mistake with Remote Procedure Calls?
What should I learn before this topic?
How can I practice it?
Is Remote Procedure Calls hard to learn?
How long does it take to learn Remote Procedure Calls?
Which topics are related to Remote Procedure Calls?
What should I study after Remote Procedure Calls?
Related topics
- Availability and Reliability (Distributed Systems & Cloud)
- Message Queues (Distributed Systems & Cloud)
- Latency vs Throughput (Distributed Systems & Cloud)
- Cloud Computing (Distributed Systems & Cloud)
- System Calls (Operating Systems)