> 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 网络分布式应用系统的核心解决方案。

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

![实现原理](https://3232244687-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYZow-MmROshIrkwdtE%2F-LhApmnmR8SZrie6pOCI%2F-LhAqQdABBsay7n0Y_H1%2Fimage.png?alt=media\&token=8087db44-52ca-4362-8738-4c41643a97ca)

性能问题：

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