On Fri, Jun 1, 2012 at 11:14 AM, cootcraig <cr
...@coot.net> wrote:
> I want to try out using reel instead of Trinidad/Sinatra. My thought
> is each incoming connection would be immediately handed to a Celluloid
> actor and the actor would write the response on the connection. This
> would avoid starting separate threads for each AJAX request.
It depends which Ruby implementation you're on. On JRuby, every fiber
(which Reel uses to handle a request) maps to a native thread, so
Celluloid::IO in general won't help you get your thread count down.
If threads are working for you there's not much reason to switch. The big
worry with threads is exhausting memory. Keep in mind that Linux has an
O(1) scheduler, so large numbers of threads won't bog the system down any
more than small numbers of threads if you're servicing the same amount of
load.
--
Tony Arcieri