distributedsystem/microservice/grpc

Conventional RPC

Early RPC frameworks like CORBA and Java RMI enabled remote function calls similar to local calls. However, these were complex, protocol-specific (e.g., TCP), and lacked interoperability, making them unsuitable for modern distributed systems.

SOAP

SOAP, promoted by enterprises like Microsoft and IBM, was designed to address conventional RPC limitations. It uses XML-based structured data and supports multiple transport protocols (commonly HTTP). Though popular for service-oriented architectures (SOA), SOAP’s complexity and bloated specifications made it a legacy technology, largely replaced by REST in modern distributed systems.

REST

REST, based on the HTTP protocol, models distributed applications as resources accessible via unique URLs, with state changes through HTTP verbs (e.g., GET, POST). It became the standard for building microservices due to its simplicity and use of JSON/XML for data representation. However, REST has limitations:

  • Inefficient text-based protocols: JSON and HTTP/1.x are not efficient for service-to-service communication as they require converting data to/from text.
  • Lack of strongly typed interfaces: REST lacks built-in type-safe service definitions, leading to interoperability issues and runtime errors, especially in polyglot systems.
  • Architectural enforcement: REST is hard to enforce during implementation, leading to inconsistencies. Many so-called RESTful services deviate from the original principles.

These limitations in existing inter-process communication methods led to the development of modern protocols like gRPC to address the challenges of efficiency, interoperability, and enforceable standards in cloud-native applications.