- A Remote Procedure Call (RPC) happens to be the most straightforward form of an API which allows developers to communicate to a server in order to remotely execute code – in short, it is very similar to a function call, but between two different systems.
- Since Web APIs (aka REST APIs) are popular these days, please note that technically, an RPC is termed as a Web API when it’s implemented in HTTP. So the core concept or logic is the same, but due to the involvement of a different protocol, the syntax changes and so does the name.
- While REST APIs are quite easy to implement and work really well in most of cases, there might be a few instances (particularly in large scale applications) where REST might fail and that is when developers need to go old-school and depend on RPCs to enable an application to communicate internally.
- You might ask yourself how a RPC is a better option when compared with REST, which is used by way more developers and systems? In order to understand this, it is important to have a look at the following comparison.