Backend Development 6 min read

What Is RPC and Why It Is Not a Protocol

The article clarifies that RPC (Remote Procedure Call) is a mechanism—not a protocol—used to abstract network communication so remote methods can be invoked like local calls, illustrating its design with LPC, dynamic proxies, request handlers, and showing HTTP as one possible implementation.

Java Tech Enthusiast
Java Tech Enthusiast
Java Tech Enthusiast
What Is RPC and Why It Is Not a Protocol

While browsing a subscription account, the author noticed many articles describing RPC (Remote Procedure Call) as a "protocol" and argued that this is a misconception. RPC is a mechanism that abstracts network details to invoke remote methods, not a communication protocol.

The article first introduces LPC (Local Procedure Call), a Windows IPC mechanism that uses ports for message‑based communication between processes. LPC serves as a local counterpart to RPC.

RPC stands for Remote Procedure Call. It works by packaging method parameters into a message, sending it to a server, deserializing the parameters, executing the method, and returning the result in the same way. The classic paper "Implementing Remote Procedure Calls" is cited as a reference.

Practical considerations are discussed: the remote call should be as easy to use as a local call, and the underlying network communication must be reliable. The author uses a hypothetical "Cangqiong Delivery" service that calls WeChat Pay via HttpClient as an example of a simple remote call.

For large projects with many remote services, the author suggests creating a "request handler" and a "service registrar" to centralize call handling, using reflection and dynamic proxies to hide serialization and network details from the caller.

The design treats the client as the "caller" and the web server as the "service provider". Data is transmitted as binary streams, requiring serialization on the client side and deserialization on the server side. The author proposes using dynamic proxy classes to intercept method calls, perform the full RPC workflow internally, and present a local‑method‑like experience to developers.

Finally, the author notes that HTTP can be seen as an implementation of RPC and encourages readers to view RPC as a design pattern rather than a protocol.

Distributed SystemsBackend DevelopmentRPCIPCRemote Procedure Call
Java Tech Enthusiast
Written by

Java Tech Enthusiast

Sharing computer programming language knowledge, focusing on Java fundamentals, data structures, related tools, Spring Cloud, IntelliJ IDEA... Book giveaways, red‑packet rewards and other perks await!

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.