jruby / jruby-rack

Rack for JRuby and Java appservers
MIT License
397 stars 136 forks source link

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

Open kares opened 11 years ago

kares commented 11 years ago

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

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

WiseMaestro commented 10 years ago

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?

kares commented 10 years ago

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!

loganb commented 10 years ago

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.

kares commented 10 years ago

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

rthbound commented 8 years ago

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