4 ms·
Those who refuse to learn history are doomed to repeat it. REST is not the end of history, there can and should be successor architectures, but RPC is not that
by parasubvert 9y ago
Those who refuse to learn history are doomed to repeat it.
REST is not the end of history, there can and should be successor architectures, but RPC is not that successor. It’s been around a very long time and fell out of fashion for good reason. It is a convenient approach that can be used if you have major control over all the interfaces, endpoint implementations and underlying infrastructure, as Google does for its use of gRPC. It really falls over if you want independent implementations and variable infrastructures over a large scale, as is the case for most Internet / Web interactions.
RPC is fundamentally flawed in that it tries to pretend that the network doesn’t exist and that distributed systems don’t have fundamentally different concerns than single computer systems. A good overview of this history from 2009 is here:
https://www.scribd.com/mobile/document/24415682/RPC-and-its-Offspring-Convenient-Yet-Fundamentally-Flawed https://www.scribd.com/mobile/document/24415682/RPC-and-its-...
Keep in mind that REST only became popular around 2007, it was an uphill battle to popularize it from 2001 onwards. The web had grown to a mammoth, and vendors couldn’t make money off it, so wanted to replace it with CORBA or some other RPC (SOAP). It took a concerted effort to fight that in standards bodies, on mailing lists, on blogs. Those days didn’t have Github or social media or a myriad programmer conferences. The posts are still up if you want to see them. This history of having to fight to be perceived as relevant and useful is why REST tends to have a bit of misguided religion behind it. SQL proponents had the same issue longer ago.
The Web and REST led to the largest increase in networked computer interoperability in history, after the TCP/IP suite and Telnet. The architectural style is what catalyze JavaScript into such a ubiquitous language as it made mobile code a first class citizen in the architecture. It’s what catazlyed Google into a powerhouse as it baked self describing, uniform interfaces as the standard, enabling spidering, indexing and analytics on a global scale. Moving on from it will be harder than people realize.
By all means, be an engineer - use RPC if it fits your problem and constraints better. Use event streams if it fits your problem better. Use GraphQL or SPARQL if a data query interface is a better solution for your needs. There is no one architecture. But please, rants about how the world would be better if we all did RPC, it comes across as very divorced from the wide variety of problems and suitable architectures out there.
- jstimpfle 9y ago> It really falls over if you want independent implementations and variable infrastructures over a large scale, as is the case for most Internet / Web interactions. But what exactly? I can't really think of anything that would work without an interface description (like a HTML form). Let's have a few informal RPC signature conventions for example for retrieving a Web page (the equivalent to HTTP GET). It would make developers lives easier. But essentially there is no problem with replacing links with remote procedure calls.
- parasubvert 9y agoHTTP GET is one of the most formalized, optimized and tested standards in the world. Replacing that with “an informal RPC signature” would be a nightmare for developers : misunderstood semantics, little to no interoperability, poor performance, poor scalability, and on. If you think there is no problem replacing hyperlinks with RPCs, be my guest, do so on all your forthcoming projects, and see if it works. It sounds like a bad idea to me but we are both just random people on the internet.