From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: * X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=1.0 required=3.0 tests=AWL,HK_RANDOM_FROM, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: rails 2 and slow external services Date: Mon, 13 Dec 2010 02:39:36 -0800 Message-ID: <20101213103936.GA8440@dcvr.yhbt.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1292237005 28788 80.91.229.12 (13 Dec 2010 10:43:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 13 Dec 2010 10:43:25 +0000 (UTC) To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Mon Dec 13 11:43:21 2010 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:164 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PS5sD-0001eU-8F for gclrrg-rainbows-talk@m.gmane.org; Mon, 13 Dec 2010 11:43:17 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id CBB5E1858317; Mon, 13 Dec 2010 05:43:15 -0500 (EST) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id A31651858317 for ; Mon, 13 Dec 2010 05:39:37 -0500 (EST) Received: from localhost (unknown [127.0.2.5]) by dcvr.yhbt.net (Postfix) with ESMTP id A9F271F7E8; Mon, 13 Dec 2010 10:39:36 +0000 (UTC) ghazel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > Hi, > > Some of my page loads (currently serviced by Unicorn) spend a great > deal of time waiting for external services (OpenID, OAuth, etc over > Net::HTTP and curb), so I'm looking at Rainbows!. I use Rails 2.3.10. > Which concurrency model in Rainbows! is best suited for this sort of > page? I'm not totally clear on which parts if any of Rails are > thread-safe. Hi, if you want compatibility over the greatest number of existing Gems, then ThreadSpawn and ThreadPool are the safest options. I'm fairly certain Rails 2.3 (or even 2.2) are _advertised_ as thread-safe but I've never tested it heavily. Hopefully other folks can give some feedback here. If you're running Ruby 1.9, then RevThreadSpawn and RevThreadPool should be good options if you do heavy keepalive, too, but they're a bit iffy under 1.8 due to incompatibilities with libev and the MRI 1.8 threading model. -- Eric Wong _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying