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.
发布评论
评论(2)
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.
我怀疑 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.