jruby-rack icon indicating copy to clipboard operation
jruby-rack copied to clipboard

"live" streaming (Rails 4.x) likely broken

Open kares opened this issue 11 years ago • 5 comments

due magic-threading in ActionController::Live "middleware" ...

This issue seems to be lacking activity, you can change that by posting a bounty.

kares avatar Mar 05 '13 06:03 kares

I can confirm that this causes my application (using trinidad) to deadlock.

Would it be possible to use java threads as a drop in replacement for "magic-threading" (what does that mean?) to get this to work?

WiseMaestro avatar Dec 13 '13 22:12 WiseMaestro

Ruby threads use Java threads the problem is the way they're used in Rails - simply not "thread-safe" code. For Trinidad/JRuby-Rack there would be a better solution to this leveraging servlet async support - ideally Rails core would hide the threaded impl under some class that could than be replaced at runtime - so it's some work to be done, go for it!

kares avatar Dec 14 '13 05:12 kares

Is the nature of the problem documented with greater detail anywhere? I'm trying to understand what part of the Live middleware is thread-unsafe.

loganb avatar Dec 16 '13 19:12 loganb

it dead locks - that's all there is (for now) ... I have not looked deeper and I have not tracked if anyone else did ... sorry

kares avatar Dec 16 '13 20:12 kares

Has anyone tried this against the rails 5 betas? http://weblog.rubyonrails.org/2016/2/27/Rails-5-0-beta3/

rthbound avatar Mar 05 '16 21:03 rthbound