Replace Faye with rails 4 server side events? Faye VS rails 4 streaming?

狂风中的少年 提交于 2019-12-05 04:53:39

To run Rails 4 streaming you need at least Chrome 9+, Firefox 6.0+, Opera 11+, Safari 5+, iOS Safari 4.0+, Blackberry, Opera Mobile, Chrome for Android or Firefox for Android. For older versions of IE, you can use EventSource polyfill but one of the downsides of SSEs is that they do not support bi-directional communication.

Faye should run in any browser capable of one of the following:

  • WebSockets (including the Firefox 6 and Chrome 14 implementations as of 0.6.4)
  • XMLHttpRequest
  • CORS
  • JSON-P

Basically, the biggest diference between two solution is that Faye is based on Bayeux protocol, this means that the Faye should works in all browsers and servers that implements Bayeux protocol (currently Faye server implements Node.js and Ruby)

I think is better continue with private_pub and Faye because both are more stable and you can find more information about them on the internet.

I hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!