> For the complete documentation index, see [llms.txt](https://yunzhao.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yunzhao.gitbook.io/notes/java/class-libraries/rmi.md).

# RMI

RMI（Remote Method Invocation）是 JDK 自带的 RPC 框架，是纯 Java 网络分布式应用系统的核心解决方案。

实现了一台虚拟应用对远程方法的调用可以同对本地方法的调用一样。

![实现原理](/files/-LhAqQdABBsay7n0Y_H1)

性能问题：

* Java 默认的序列化，性能不是很好。
* 计划于 TCP 短连接。
* 阻塞式 I/O。
