c10k paradigm

Alexandre Riveira alexandre at objectdata.com.br
Tue Apr 16 17:19:39 UTC 2013

In file ems/rainbows-4.5.0/lib/rainbows/event_machine.rb line 74: 
server.app is a Rails::Rack::LogTailer class.

should not be ActionController::Dispatcher.new or like ???


Alexandre Riveira

Em 16-04-2013 18:35, Eric Wong escreveu:
> Alexandre Riveira <alexandre at objectdata.com.br> wrote:
>>> "lock slowness" - which version of Ruby is this?
>> ruby 1.9.3p385 (2013-02-06 revision 39114) [i686-linux]
> OK, I think you were just unable to take advantage of threading in EM
> via app.deferred?
> I think you also need to enable threading in Rails, too.
>>> Did you modify your app to use app.deferred? + TryDefer as I pointed
>>> you to in the other message?
>>>> Could it be that  the controllers  of the  rails  would run without
>>>> party  pool  threads  only with  EventMachine  (C10K) while others
>>>> would use the  controller  with  EventMachine thread pool  (erp)?
>>> That should allow some rails controllers to use threads
>>> (app.deferred? => true) while others do not use threads
>>> (app.deferred? => false).  Keep in mind this is not a very common
>>> configuration, so not many people have experience with it in
>>> production.
>> Your suggestion seems to be better, but I'm sorry I did not
>> understand where I put this method, the controller would be as
>> below?
>> class HomeController < ApplicationController
>>    def deferred?
>>      true
>>    end
>> end
> Probably not, this needs to be visible at the Rack layer, not Rails.
> See what Mark just said.  Also, t/app_deferred.ru in the rainbows
> source[1].  There's also a link to Ezra's old post about it in the
> TryDefer documentation.
> [1] - git clone git://bogomips.org/rainbows && $EDITOR t/app_deferred.ru
> _______________________________________________
> Rainbows! mailing list - rainbows-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rainbows-talk
> Do not quote signatures (like this one) or top post when replying

More information about the rainbows-talk mailing list