Chapter 2: The History of RPC — From Sun RPC to gRPC

Understanding where gRPC came from helps you understand why it makes the design choices it does. Every feature in gRPC is a response to a problem encountered in earlier RPC systems.

The Idea: Make the Network Invisible (1976–1984)

The concept of RPC was formalized by Bruce Jay Nelson in his 1981 PhD thesis at Xerox PARC. The dream was simple: make calling a function on a remote machine look identical to calling a local function.

// The programmer writes this:
result = compute_tax(income, region);

// They don't care if compute_tax runs locally or on a machine 1000km away.
// The RPC framework handles: serialization, network, deserialization, errors.

This is called location transparency — the caller doesn't know (or care) where the function executes.

Sun RPC / ONC RPC (1984)

Sun Microsystems created the first widely-used RPC system. You still encounter it today — NFS (Network File System) is built on Sun RPC.

Key characteristics:

💡 C Developer Note

If you've ever used rpcgen to generate client/server stubs from a .x file, you already understand the core gRPC workflow. gRPC's protoc is the modern equivalent of rpcgen, and .proto files are the modern equivalent of .x files.

DCE/RPC (1988) and DCOM (1993)

DCE/RPC (Distributed Computing Environment) was created by the Open Software Foundation. It introduced:

Microsoft built DCOM (Distributed COM) on top of DCE/RPC. It powered Windows distributed computing in the 90s. If you've ever dealt with Windows COM objects, that's the legacy.

CORBA (1991)

The Object Management Group created CORBA (Common Object Request Broker Architecture). It was ambitious:

Why it failed: Incredibly complex. The spec was thousands of pages. Implementations were buggy and incompatible. Vendor lock-in was rampant. It became a cautionary tale of over-engineering.

⚠️ Lesson for gRPC

CORBA's failure taught the industry: keep it simple, make it open-source (not just open-spec), and ensure one reference implementation works well rather than having many incompatible ones. gRPC learned this lesson — one open-source implementation, simple proto files, pragmatic design.

Java RMI (1997)

Java's built-in RPC. Simple but Java-only. Showed that language-specific RPC is a dead end for heterogeneous systems.

XML-RPC → SOAP (1998–2000)

The web era brought XML-based RPC:

SOAP dominated enterprise computing for a decade. It worked, but:

REST (2000) — The Rebellion

Roy Fielding's PhD thesis described REST (Representational State Transfer). It wasn't RPC at all — it was a different paradigm based on resources and HTTP verbs. But it became the dominant API style because:

REST won the public API war. But for internal microservice communication, its weaknesses showed:

Thrift (2007) and Avro (2009)

Apache Thrift (Facebook) was a direct predecessor to gRPC's approach:

Apache Avro (Hadoop ecosystem) took a different approach — schema embedded with data, no code generation required.

Google Stubby (2001–2015, Internal)

Inside Google, Stubby handled all inter-service RPC from 2001 onwards. At its peak:

Stubby couldn't be open-sourced directly because it was deeply coupled to Google's internal systems. So they redesigned it on top of open standards (HTTP/2) and released it as gRPC in 2015.

gRPC (2015–Present)

gRPC took the best ideas from all predecessors:

FeatureInherited From
Binary serializationSun RPC (XDR), Thrift
IDL + code generationSun RPC, CORBA, Thrift
HTTP as transportSOAP, REST
StreamingWebSockets, Stubby
MultiplexingHTTP/2 (SPDY)
SimplicityREST (lesson from CORBA/SOAP failure)
Multi-languageCORBA, Thrift
Production-proven patternsStubby (15 years at Google scale)

Timeline Visualization

1984 Sun RPC ──────── NFS still uses it today │ 1988 DCE/RPC ──────── UUIDs invented here │ 1991 CORBA ─────────── Over-engineered, died slowly │ 1997 Java RMI ──────── Java-only, limited │ 1998 XML-RPC ─────┐ │ ▼ 2000 SOAP ──────────── Dominated enterprise for a decade │ 2000 REST ──────────── Won the public API war │ 2001 Stubby ────────── Google internal, 10B+ RPCs/sec │ 2007 Thrift ────────── Facebook, closest ancestor to gRPC │ 2008 Protobuf ──────── Open-sourced (serialization only) │ 2012 HTTP/2 draft ──── SPDY → HTTP/2 │ 2015 gRPC 1.0 ──────── Open-sourced by Google │ 2017 CNCF ──────────── gRPC joins Cloud Native Computing Foundation │ 2023 gRPC mature ───── De facto standard for microservice RPC

Why This History Matters

When you encounter gRPC design decisions that seem arbitrary, they usually trace back to a lesson learned from a predecessor:

Key Takeaways