Mastering Distributed RPC: Principles, Workflows, and Top Frameworks Explained
This article explains the fundamentals of distributed RPC, outlines its end‑to‑end communication workflow, and compares major frameworks such as gRPC, Apache Thrift, Dubbo, Spring Cloud Netflix, ZeroMQ, Apache Avro, and gRPC‑Web, helping developers choose the right solution for their microservice architecture.
Distributed RPC
Distributed RPC (Remote Procedure Call) enables a program to invoke functions on a remote machine over a network as if they were local calls.
Distributed RPC Principles
The communication workflow is illustrated below:
The process includes the following steps:
Client initiates request : The client calls a local proxy object, which handles communication with the remote server without exposing network details.
Serialize request : The proxy serializes the method name, parameters, etc., into a transmittable format such as JSON, XML, or binary.
Send request : The serialized data is transmitted over the network to the remote server.
Server receives request : The server deserializes the data back into the original invocation information.
Execute request : The server invokes the actual service method and processes the request.
Serialize response : The result is serialized into a network‑friendly format.
Send response : The serialized response is sent back to the client.
Client receives response : The client deserializes the response and returns the result to the caller.
Popular Distributed RPC Frameworks
1. gRPC : An open‑source high‑performance RPC framework from Google, based on Protocol Buffers for serialization, supporting multiple languages, HTTP/2, bidirectional streaming, and various call patterns.
2. Apache Thrift : Originally developed at Facebook and now an Apache project, Thrift provides cross‑language RPC with its own IDL, supporting binary, JSON, and compressed formats, and offers multiple transport protocols such as TCP, HTTP, and Zlib.
3. Apache Dubbo : Alibaba’s high‑performance Java RPC framework, featuring service governance, multiple protocols (Dubbo, REST, HTTP, WebService), and components such as registry, protocol, and cluster.
4. Spring Cloud Netflix : A set of Spring Cloud components built on Netflix OSS (Ribbon, Feign, Hystrix) that provide HTTP‑based RPC‑style service calls and client‑side load balancing.
5. ZeroMQ : A lightweight messaging library that can be used to build custom RPC systems.
6. Apache Avro : An Apache data serialization system that can also serve as the basis for RPC frameworks.
7. gRPC‑Web : A version of gRPC that enables direct RPC calls from web browsers, supporting cross‑origin communication.
Choosing the right framework depends on project requirements, programming language, and ecosystem.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Mike Chen's Internet Architecture
Over ten years of BAT architecture experience, shared generously!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
