RPC is "Fundamentally Flawed"...

1 min read

From Martin Kleppmann's brilliant book Designing Data-Intensive Applications:

"Although RPC seems convenient at first, the approach is fundamentally flawed."

Kleppmann makes the point that function calls are predictable in the sense that they either succeed or fail, based on parameters that are in control of the caller. Requests on the other hand might fail due to the network being down, or due to a latency causing a timeout, even if the original request is correct. Worse, a request might successfully reach the remote service, but fail at providing a response to the caller. This means that successfully executing a request multiple times, but failing to notify the caller, will end up causing data duplication.

Kleppmann concludes:

“All of these factors mean that there’s no point trying to make a remote service look too much like a local object in your programming language, because it’s a fundamentally different thing. Part of the appeal of REST is that it doesn’t try to hide the fact that it’s a network protocol (although this doesn’t seem to stop people from building RPC libraries on top of REST).”

Which is not to say that RPC doesn't have its uses, but Kleppmann sees it used primarily among services owned by the same organisation.

Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems: Amazon.de: Kleppmann, Martin: Fremdsprachige Bücher
Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems | Kleppmann, Martin | ISBN: 9781449373320 | Kostenloser Versand für alle Bücher mit Versand und Verkauf duch Amazon.
Get the book on Amazon

Further links:

Previous article

Old and New

Hidden from the glamor of Marienplatz' shopping streets, old and new architecture have found a way of peaceful co-existence.

Next article

John Gruber on the MacBook Keyboard

John Gruber on the MacBook keyboard: I consider these keyboards the worst products in Apple history. MacBooks should have the best keyboards in the industry;

Related Articles

Elixir Tip: Case vs. With
3 min read

Elixir Is Not Ruby. Elixir Is Erlang

Try to remember the first time you heard about this fascinating language called Elixir. Chances are, you had by the

2 min read

Write Stupid Code

This is very much a re-interpretation of a post by Thorsten Ball, written back in 2015. Like him, I too

1 min read

Book Review: The Phoenix Project

Unless you are eager to know how modern, Western-centric enterprise works, you can totally save the time and not read this book.

1 min read