Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Reel as an AJAX server
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
cootcraig  
View profile  
 More options Jun 1 2012, 2:14 pm
From: cootcraig <cr...@coot.net>
Date: Fri, 1 Jun 2012 11:14:15 -0700 (PDT)
Local: Fri, Jun 1 2012 2:14 pm
Subject: Reel as an AJAX server
I have a Tinidad/Sinatra/Celluloid-zmq based server that was just put
into production in our call center. Each AJAX GET into Trinidad/
Sinatra ends in a wait in a Celluloid actor. When the response is
ready a signal is done by another Celluloid actor.  This is
functioning properly, but in a days work the thread count hits around
2000 and never goes down.  The server application is restarted every
night so for the current load this is working.

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.

Would this be a good implementation?  I would like to be able to scale
this up to perhaps 800 AJAX clients with a request rate of about 1 per
minute each.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Arcieri  
View profile  
 More options Jun 3 2012, 12:59 pm
From: Tony Arcieri <tony.arci...@gmail.com>
Date: Sun, 3 Jun 2012 09:59:48 -0700
Local: Sun, Jun 3 2012 12:59 pm
Subject: Re: Reel as an AJAX server

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Arcieri  
View profile  
 More options Jun 3 2012, 1:00 pm
From: Tony Arcieri <tony.arci...@gmail.com>
Date: Sun, 3 Jun 2012 10:00:33 -0700
Local: Sun, Jun 3 2012 1:00 pm
Subject: Re: Reel as an AJAX server

On Sun, Jun 3, 2012 at 9:59 AM, Tony Arcieri <tony.arci...@gmail.com> wrote:
> 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.

Note that the JRuby limitations on Fibers might be moot in the future if
the JRuby GSoC project for Kilim integration is successful.

--
Tony Arcieri


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »