search

Home  >  Q&A  >  body text

java - 远程过程调用(RPC)的意义仅仅是为了解决分布式需求么?

仅仅是为了在两台服务器上通信么?如果是一台服务器有没有必要设置两个端口调用RFC服务?这样子是不是有点多余?

PHPzPHPz2887 days ago418

reply all(4)I'll reply

  • 巴扎黑

    巴扎黑2017-04-17 17:28:35

    Distributed systems communicate with each other. Generally speaking, there are two forms:

    1. rpc

    2. Message
      These two forms are intended to achieve communication and collaboration between different components (different machines) of the distributed system.

    reply
    0
  • 迷茫

    迷茫2017-04-17 17:28:35

    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.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 17:28:35

    Why set up two ports?

    reply
    0
  • 阿神

    阿神2017-04-17 17:28:35

    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.

    reply
    0
  • Cancelreply