Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E8E647E9B for ; Fri, 5 Aug 2011 19:44:14 +0000 (UTC) Received: (qmail 5621 invoked by uid 500); 5 Aug 2011 19:44:11 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 5453 invoked by uid 500); 5 Aug 2011 19:44:10 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 5440 invoked by uid 99); 5 Aug 2011 19:44:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2011 19:44:10 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2011 19:44:02 +0000 Received: from [192.168.245.129] (montserrat.wissensbank.com [212.85.37.175]) by tor.combios.es (Postfix) with ESMTPA id 6B957DA0121 for ; Fri, 5 Aug 2011 21:43:40 +0200 (CEST) Message-ID: <4E3C47EB.1090105@ice-sa.com> Date: Fri, 05 Aug 2011 21:43:39 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Design Question References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mohit Anchlia wrote: > We are developing a new system that will run in parallel with old > system. So some requests will go to new system and some old based on > configuration. We will put software switch software which will read > configuration and the request and decide which system this will go to. > This switch calls HttpClient Post calls using thread pools to send the > request to other systems. One way is to put this code in Valve of > existing system and invoke Http call if request is bound to the new > system otherwise just call .invoke to the next in chain, is this the > good way? I personally don't like it. > > What I like is separate switch servlet that receives the call and make > Http calls to both system. This switch code will also have live thread > to refresh it's cache from config file. This I think is more > consistent and manageable. > > But I am looking for some advise from others as well. > Essentially thus, what you propose to create is reverse proxy code. This sounds like something I would do using an Apache httpd front-end, which already has a lot of machinery to inspect and direct requests to back-end systems. Furthermore, this machinery is well-tested, widely used, and reliable. There is more to proxying than just issuing HTTP Post calls (and GET's and HEAD's and rewriting redirect headers and cookies and...). --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org