Distributed systems communicate with each other. Generally speaking, there are two forms:
rpc
Message These two forms are intended to achieve communication and collaboration between different components (different machines) of the distributed system.
RPC is actually a distributed service decoupling solution. In fact, it can be understood as the definition and implementation of a set of service interfaces. The significance of PRC is that users do not need to care about the specific implementation of remote communication (so it can exist across programming languages, network protocols, and data encoding methods), but focus on implementing their own program logic.
Distributed systems communicate with each other. Generally speaking, there are two forms:
rpc
Message
These two forms are intended to achieve communication and collaboration between different components (different machines) of the distributed system.
RPC is actually a distributed service decoupling solution. In fact, it can be understood as the definition and implementation of a set of service interfaces. The significance of PRC is that users do not need to care about the specific implementation of remote communication (so it can exist across programming languages, network protocols, and data encoding methods), but focus on implementing their own program logic.
Why set up two ports?
Distributed application solutions, mainly reduce coupling. The benefits include:
Deployment granularity becomes smaller
The application is componentized and the modules are clear
Let different functions choose the most appropriate implementation method (language, etc.), the caller does not need to care
PS: Xiaobai’s random summary.