BOSH vs WebSockets:
2012-11-23 10:12
134 查看
BOSH vs WebSockets:
latency: While the BOSH draft document claims very low-latency, it will be difficult for BOSH to compete with WebSockets. Unless you have ideal conditions
where HTTP/1.1 is supported all the way through all intermediaries and by the target server, the BOSH client and connection manager will need to re-establish connections after every packet and every request timeout. This will significantly increase latency
and latency jitter. Low jitter is often more important for real-time applications than average latency. WebSocket connections will be very similar in latency and jitter to raw TCP connections.
small-packet overhead: In WebSockets there are two bytes of framing overhead for small messages. In BOSH, every message has HTTP request and response
headers (easily 180+ bytes for each round-trip). In addition, each message is wrapped in XML (supposedly optional but the spec doesn't define how) with several session related attributes.
complexity: while BOSH uses existing mechanisms in the browser, it requires a moderately complex JavaScript library to implement the BOSH semantics.
Managing this in Javascript will also increase latency and jitter compared to a native/browser (or even Flash) implementation.
traction: BOSH started life as a way to make XMPP more efficient. It grew up out of the XMPP community and from what I can tell has gotten very little
traction outside of that community. The draft documents for BOSH and XMPP are split apart, but there seems to be very little real world use of BOSH without XMPP.
latency: While the BOSH draft document claims very low-latency, it will be difficult for BOSH to compete with WebSockets. Unless you have ideal conditions
where HTTP/1.1 is supported all the way through all intermediaries and by the target server, the BOSH client and connection manager will need to re-establish connections after every packet and every request timeout. This will significantly increase latency
and latency jitter. Low jitter is often more important for real-time applications than average latency. WebSocket connections will be very similar in latency and jitter to raw TCP connections.
small-packet overhead: In WebSockets there are two bytes of framing overhead for small messages. In BOSH, every message has HTTP request and response
headers (easily 180+ bytes for each round-trip). In addition, each message is wrapped in XML (supposedly optional but the spec doesn't define how) with several session related attributes.
complexity: while BOSH uses existing mechanisms in the browser, it requires a moderately complex JavaScript library to implement the BOSH semantics.
Managing this in Javascript will also increase latency and jitter compared to a native/browser (or even Flash) implementation.
traction: BOSH started life as a way to make XMPP more efficient. It grew up out of the XMPP community and from what I can tell has gotten very little
traction outside of that community. The draft documents for BOSH and XMPP are split apart, but there seems to be very little real world use of BOSH without XMPP.
相关文章推荐
- WebSockets VS Server-Sent Events VS Long-polling
- WebSockets vs Server-Sent Events vs Long-polling
- WebSockets vs Server-Sent Events vs Long-polling
- WebSockets VS Server-Sent Events VS Long-polling
- WebSockets VS Server-Sent Events VS Long-polling
- 在windows (VS-2015) 中编译libwebsockets
- 移动Web框架:jQuery Mobile VS Sencha Touch
- asp.net 配置 web.config 禁用VS2013自带的Browser Link功能
- loadrunner Web_类函数之web_set_sockets_option()
- vs安装web环境遇到的问题-----调试器dll msdbg2.dll 未正确安装
- 安装office 2007 后 安装vs 2008 显示web组件有问题
- Face detection using HTML5, javascript, webrtc, websockets, Jetty and OpenCV
- [转] ASP.NET WEB API程序在VS启动或发布到IIS后启动后发生 - Could not load file or assembly 'System.Web.Http.WebHost’异常,无法正常访问
- WebClient vs HttpClient
- VS.net 2003 打开Web项目失败的解决方法
- Long-Polling, Websockets, SSE(Server-Sent Event), WebRTC 之间的区别
- 跟我学Windows Azure 三 使用vs2013创建windows azure web site
- vs2013无法创建html,不能发布:The web publishing extension is not installed which is required to publish
- Web service vs function call
- HOW TO RUN YOUR WEB SERVER AND MQTT WEBSOCKETS BROKER ON THE SAME PORT