XMPP 是否足够快以支持类似 MMO 的协作?

发布于 2024-10-07 10:28:19 字数 1431 浏览 0 评论 0原文

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

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

发布评论

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

评论(2

故事未完 2024-10-14 10:28:19

XMPP 速度很快,但解析 xml 确实比二进制格式需要更多的 CPU 资源。然而,它比二进制协议更容易使用/调试。

除非有数千个设备同时通信,否则您的服务器不会受到限制,因此瓶颈可能是您的移动设备解析和创建 xml 节。

如果有很多朋友连接/断开连接(导致需要处理状态更新),XMPP 也可能会耗尽您的移动电池寿命。这或许也是值得考虑的事情。

XMPP is fast, but parsing xml does take some more cpu power than a binary format. However it is much easier to user/debug than binary protocols.

Your server is not going to be limited unless there are thousands of devices communicating at the same time, so the bottleneck will probably be your mobile device parsing and creating xml stanzas.

XMPP can also be a drain on your mobile battery life if there are lots of friends connecting/disconnecting (resulting in presence updates to be processed). That might also be something to consider.

千寻… 2024-10-14 10:28:19

我怀疑 3G 会比 XMPP 造成更大的延迟。

并且压缩的使用大大减少了XML的开销。

I'd suspect that the 3G would be a greater cause of latency than XMPP.

And use of compression greatly reduces the overhead of XML.

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