Rails 3.1 中的 HTTP 流可以与 Thin 配合使用吗?
Rails 3.1 支持 HTTP 流,但仅限于兼容的 Web 服务器。宣布 3.1 候选版本的博客文章提到了 Unicorn: http://weblog.rubyonrails.org/2011/5 /22/rails-3-1-release-candidate
API 文档还提到了 Unicorn,并且有一个 Passenger 的存根: https://github.com/rails/rails /blob/master/actionpack/lib/action_controller/metal/streaming.rb
有谁知道是否支持 Thin,如果支持,我在哪里可以找到配置信息?
Rails 3.1 supports HTTP streaming, but only with compatible web servers. The blog post announcing the 3.1 release candidate mentions Unicorn:
http://weblog.rubyonrails.org/2011/5/22/rails-3-1-release-candidate
And the API docs also mention Unicorn, and have a stub for Passenger:
https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/streaming.rb
Does anyone know if Thin is supported, and if so, where I can find configuration info?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 0.5.4 版本的发行说明中:
但是,当我运行两个瘦实例(在不同端口上,其中一个设置为资源主机)时,布局中的 CSS 和 JS 在
sleep
控制器操作中的调用已完成执行。这是在生产模式下完成的。我不是 100% 确定它的机制,也许需要设置薄机架适配器才能允许流式传输。
In the release notes for the 0.5.4 release:
However when I ran two thin instances (on different ports, one set as the asset host), the CSS and JS in the layout were not loaded before the
sleep
call in the controller action had finished executing. This was done in production mode.I'm not 100% sure of the mechanics of it, perhaps the Thin rack-adapter needs to be setup to allow streaming.