Java:rmi 协议的预期开销

发布于 2024-08-08 23:42:51 字数 161 浏览 1 评论 0原文

在我的程序中,我使用两个提供不同方法的 RMI 服务器来模拟两个笔记本之间的简单网络协议。从我的跟踪日志中我可以看到“数据包”的传输时间当前在 850 到 1100 毫秒之间变化。

传输时间是否在预期范围内? RMI协议的开销真的有那么大吗?

BR,

马库斯

Within my program I'm using two RMI servers, which provide different methods, to simulate a simple network protocol between two notebooks. From my trace log I can see that the transmission time of a "packet" currently varies between 850 and 1100 ms.

Are the transmission times in the expected range? Is the overhead of the RMI protocol really that large?

BR,

Markus

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

尹雨沫 2024-08-15 23:42:51

不,RMI的开销并没有那么大。对于这种响应时间,您的请求通常必须非常大,或者您的网络非常慢。

No, the overhead of RMI is not that large. Your requests would typically have to be very big or your network really slow for that kind of response time.

好听的两个字的网名 2024-08-15 23:42:51

导致 RMI 速度显着减慢的原因之一是您如何将数据分成多个数据包。例如,在我的工作中,我们曾经测试过一种设置,通过 RMI 逐一发送事件,每个事件大约需要 35 毫秒才能传输。之后,我们尝试对多个事件进行分组缓冲区并将它们作为一个组发送,在大约 20,000 个事件以约 60 毫秒的速度发送时,我们得出的结论是,虽然 RMI 没有大量带宽开销,但发送/接收部分可能有。

One thing which causes RMI to slow down a lot is how you divide your data into several packets. For example at my work we once tested a setup where we sent events over RMI one by one, each event took about 35ms to get transferred. After that we tried to group buffer multiple events and sending them as a group and at around 20 000 events going at ~60ms we came to conclusion that while RMI doesn't have a lot of bandwidth overhead, the sending/receiving part may have.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文