Remote Procedure Invocation (RPI)

Briefly speaking, remote procedure call is a protocol that anyone can use to access services from any other providers located remotely in the network, without the need of understanding the network details. The client uses the protocol of request and replies to make requests for services and it is one of the most feasible solutions to REST for big data search systems. It has one of the major advantages of serialization time. Some of the technologies providing RPI are Apache Thrift and Google's gRPC. gRPC is a widely adopted library and it has more than 23,000 downloads from Node.js per day. It has some awesome utilities such as pluggable authentication, tracing, load balancing, and health checking. It is used by Netflix, CoreOS, Cisco, and so on.
This pattern of communication has the following advantages:

  • Request and reply are easy
  • Simple to maintain as there is no middle broker
  • Bidirectional streams with HTTP/2-based transportation methods
  • Efficiently connecting polyglot services in microservices styled architectural ecosystems

This pattern has the following challenges and issues for consideration:

  • The caller needs to know the locations of service instances, that is, maintain a client-side registry and server-side registry
  • It only supports the request and reply model and has no support for other patterns such as notifications, async responses, the publish/subscribe pattern, publish async responses, streams, and so on

RPI uses binary rather than text to keep the payload very compact and efficient. These requests are multiplexed over a single TCP connection, which can allow multiple concurrent messages to be in flight without having to compromise for network consumption usage.