您的位置:首页 > 其它

The SmartFoxServer 2X client-server protocol

2013-04-02 00:00 183 查看
转自:http://docs2x.smartfoxserver.com/Overview/sfs2x-protocol

1 网络通信内容用二进制流来替代xml

SmartFoxServer 2X uses a highly effiecient binary protocol that makes the server performance outstanding under different aspects. Messages are light on the bandwidth and fast to parse by the client and server engine. Additional on-the-fly compression allows for extra size reduction without impacting the general performance.
网络开销和cpu开销相比,常用的做法就是用cpu来换网络带宽。

2 改进协议处理算法

Protocol performance

The overall performance of the protocol parsing is also significantly improved in version 2X on both the server and client. Especially on the server side this has a notable effect. We have benchmarked the amount of messages per second that can be parsed with the old text protocol versus the new one.
算法A-算法B=0.01s,那么N×差值,N越大,结果越大。平时我们看算法的作用似乎无关紧要,由此可见,算法是很重要的。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  smartfoxserver protocol
相关文章推荐