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: preliminary reverse proxy Rack application Date: Tue, 1 Feb 2011 18:58:11 -0800 Message-ID: <20110202025811.GA26963@dcvr.yhbt.net> 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 1296617352 13155 80.91.229.12 (2 Feb 2011 03:29:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 2 Feb 2011 03:29:12 +0000 (UTC) To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Wed Feb 02 04:29:07 2011 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 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:209 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PkTOy-0004Xf-WE for gclrrg-rainbows-talk@m.gmane.org; Wed, 02 Feb 2011 04:29:05 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 6EDE4185836C; Tue, 1 Feb 2011 22:29:04 -0500 (EST) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id CE91E1858381 for ; Tue, 1 Feb 2011 21:58:12 -0500 (EST) Received: from localhost (unknown [127.0.2.5]) by dcvr.yhbt.net (Postfix) with ESMTP id 10BA61F87A; Wed, 2 Feb 2011 02:58:12 +0000 (UTC) Hi all, since some folks have been interested in reverse proxies, I just pushed this out to rainbows.git http://bogomips.org/rainbows.git/commit/?id=130d086666ccd825fcb13c It's a fairly big patch but basically works assuming the backend is behaving and terminating requests. ----------- commit message ------------- This can be a starting point for developing Cool.io or EventMachine-based reverse proxy applications on Rainbows! Eventually Rainbows! could replace nginx for Unicorn users! Just don't consider this code production ready, yet, at all, it doesn't handle any sort of failover and has no automated tests, yet. --- The RDoc in lib/rainbows/reverse_proxy.rb explains the rest examples/reverse_proxy.ru | 9 ++ lib/rainbows.rb | 1 + lib/rainbows/reverse_proxy.rb | 185 +++++++++++++++++++++++++++ lib/rainbows/reverse_proxy/coolio.rb | 61 +++++++++ lib/rainbows/reverse_proxy/ev_client.rb | 39 ++++++ lib/rainbows/reverse_proxy/event_machine.rb | 46 +++++++ lib/rainbows/reverse_proxy/multi_thread.rb | 6 + lib/rainbows/reverse_proxy/synchronous.rb | 21 +++ 8 files changed, 368 insertions(+), 0 deletions(-) create mode 100644 examples/reverse_proxy.ru create mode 100644 lib/rainbows/reverse_proxy.rb create mode 100644 lib/rainbows/reverse_proxy/coolio.rb create mode 100644 lib/rainbows/reverse_proxy/ev_client.rb create mode 100644 lib/rainbows/reverse_proxy/event_machine.rb create mode 100644 lib/rainbows/reverse_proxy/multi_thread.rb create mode 100644 lib/rainbows/reverse_proxy/synchronous.rb -- 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