2 ms·
> The problem with RPC is that people are not familiar with it. Your response seems to indicate to me that you are not familiar with it to know its downsides o
by WorldMaker 7y ago
> The problem with RPC is that people are not familiar with it.
Your response seems to indicate to me that you are not familiar with it to know its downsides or long, complicated history. RPC as a concept dates back to the beginnings of inter-process communication in the 60s and has an equally long history in network communications.
There's always been a pendulum swinging between tightly coupled RPC standards and loosely coupled data interchange standards (or one made from the other in all sorts of combinations). It's a fact of software development life since essentially the dawn of the industry.
It's the "tightly coupled" part of RPC that caused REST to be evangelized over SOAP, an XML-based RPC standard. It's the "tightly coupled" part that GraphQL tries to balance in its looser query syntax embedded in its RPC dialect.
There's nothing wrong with "tightly coupled", just know that it is a trade off. You almost seem to realize it in your realizations that RPC is complicated when working with third party developers. You are almost close to the enlightenment of why REST became so popular and SOAP faded away.
> basically by introducing a schema to RPC
COM has IDL. SOAP has WSDL. gRPC has proto files. GraphQL has its schema language. These wheels have been invented many times, it might be useful to research some of them if you wish to further discuss RPC.
ETA: Which is not meant to discourage you, I want to encourage you to learn more. It's not wrong that you don't know these things, it's an opportunity, and I really do hope you explore it.
- brillout 7y agoThe most fundamental difference between RPC and REST/GraphQL is that RPC is schemaless whereas a RESTful or GraphQL API has a schema. The whole point of a schema is to have a generic API. Whereas with RPC and any other schemaless approach such as SOAP, you are essentially building a custom API that is only usable for your clients. That's precisely the reason why RPC is not usable to create an API that is meant to be used by third party devS. Third party devS need a generic API. That's the point. Also, a generic API decouples whereas a custom API tightly couples. WSDL is actually only describing the API - it's not defining a schema. So SOAP is not and was never usable for a third-parties. Same for gRPC's proto files. I do appreciate your encouragement but I don't see where I concretely am missing out on something important. You simply state that I'm lacking knowledge without ever concretely showing the flaws of Wildcard. > You are almost close to the enlightenment That's just not very helpful. You are telling me that I'm missing an important point without telling what it is I'm missing. I'd love to be shown wrong. You would for sure save me a lot of effort if you'd pin point my lack of knowledge. For a Node.js backend and a browser frontend, what exactly is the problem with Wildcard API? (https://github.com/reframejs/wildcard-api https://github.com/reframejs/wildcard-api). As long as you don't have third-parties consuming your API, I'd say that Wildcard is superior to GraphQL and REST >95% of the time. Especially when using Wildcard with TypeScript. > There's always been a pendulum swinging between tightly coupled RPC standards and loosely coupled data interchange standards (or one made from the other in all sorts of combinations). It's a fact of software development life since essentially the dawn of the industry. Interesting. I've not been a programmer long enough to know all that :-). Thanks for you reply, I truly appreciate it.