Home

RPCstyle

RPCstyle is a design approach for building distributed systems in which components expose procedures that can be invoked remotely as if they were local. In RPCstyle, a client issues a call to a remote service, and the framework handles network communication, data marshaling, and error propagation to resemble a normal function call.

Typical elements include a defined interface or contract that lists available procedures and their data types,

RPCstyle has a long history, from early Sun RPC and ONC RPC to modern frameworks such as

Advantages include strong, explicit interfaces, type safety, and potential performance benefits due to compact binary protocols.

Design considerations for RPCstyle include handling timeouts and retries, security and authentication, streaming or bidirectional communication,

and
generated
client-side
stubs
and
server-side
skeletons.
The
client
uses
a
local
proxy
to
marshal
arguments,
send
the
request
to
the
server,
and
receive
a
result
or
error,
masking
the
underlying
network
details.
gRPC,
Apache
Thrift,
JSON-RPC,
and
XML-RPC.
Many
systems
rely
on
an
interface
description
language
(IDL)
such
as
Protocol
Buffers
or
Thrift
to
generate
code.
Transport
layers
vary
and
may
include
HTTP/2,
TCP,
or
other
protocols.
Challenges
encompass
latency
and
partial
failures,
versioning
and
evolving
contracts,
and
increased
coupling
between
client
and
server.
RPCstyle
is
often
contrasted
with
REST,
which
emphasizes
resources
and
uniform
interfaces
rather
than
procedures.
and
backward
compatibility
during
evolution
of
interfaces.
It
is
well
suited
for
high-performance
microservices
with
clearly
defined
service
boundaries,
whereas
loosely
coupled
or
publicly
exposed
web
APIs
may
favor
alternative
styles.