知识卡片

普通读书笔记卡 · 3217

RPC将远端方法包装成本地调用

理解等级:中级

RPC 让一个进程调用由另一进程执行的方法。gRPC 客户端桩隐藏发起远程请求的细节,服务端按约定暴露方法,双方需要覆盖交互的模式定义。调用形状像本地方法,但实际仍跨进程,故设计时要保留对延迟、网络故障和接口兼容性的判断。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      A Remote Procedure Call (RPC) involves calling a method in one process but having it execute code in another process. While REST can project a model of the domain and provides an abstraction from the underlying technology to the consumer, RPC involves exposing a method from one process and allows it to be called directly from another.

    参考来源

    - 位置:《Mastering API Architecture》第1章《Design, Build, and Specify APIs》之《Introduction to Remote Procedure Call (RPC) APIs》(源文件:_epub-src/OEBPS/ch01.xhtml) - 结论依据:原文定义 RPC 的跨进程执行方式,并说明 gRPC 服务端暴露方法、客户端使用 stub、双方依赖 schema。 - 原始内容:A Remote Procedure Call (RPC) involves calling a method in one process but having it execute code in another process. While REST can project a model of the domain and provides an abstraction from the underlying technology to the consumer, RPC involves exposing a method from one process and allows it to be called directly from another.