Re:Live Streaming in Rails 4.0
by thibaut_barrere on Monday July 30, 2012 @03:08PM
(#4314094)
Streaming looks like a natural evolution to me, to gradually send JSON data back to the client etc for instance.
I don't think this is something that could be done easily as a gem (at least not without a serious dose of unstable monkey-patching).
The lightweight framework Sinatra has had streaming for a some time now, and if it is not too heavy for Sinatra it should not be too heavy for rails. Rails is way larger than Sinatra.
> The lightweight framework Sinatra has had streaming for a some time now
Rack itself has response streaming support[0]. As a result, even before Sinatra 1.3 and the `stream` helper method you could stream responses in Sinatra.
[0] since pretty much forever ago: https://github.com/rack/rack/commit/53e299724b9173efe50e9afc...
The hardest part of managing mature software is keeping it lean.