Return-Path: X-Original-To: apmail-cocoon-users-archive@www.apache.org Delivered-To: apmail-cocoon-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 039A1C54D for ; Thu, 20 Jun 2013 13:36:19 +0000 (UTC) Received: (qmail 88127 invoked by uid 500); 20 Jun 2013 13:36:18 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 87995 invoked by uid 500); 20 Jun 2013 13:36:18 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 87910 invoked by uid 99); 20 Jun 2013 13:36:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jun 2013 13:36:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of scherler@gmail.com designates 209.85.214.47 as permitted sender) Received: from [209.85.214.47] (HELO mail-bk0-f47.google.com) (209.85.214.47) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jun 2013 13:36:10 +0000 Received: by mail-bk0-f47.google.com with SMTP id jg1so2880113bkc.34 for ; Thu, 20 Jun 2013 06:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=vmYbm65P6+9Hq511aifZfRbhUoB8BWCN154OsaIgt80=; b=l3l/xDHDpuQ0XFxMk9EfIQm6Xp28Wf6xcTnN2ayRO2vUHD2X3YD1kPWpCi+6BE1uOs MDlCUZkpcKQh8jdnPBACNDr3OqcrUtIFL4r/rRkhbLGBz/L+MoacAqQ4UKIf3DRuMqj6 ZiNtgrS5YD+SBNRmpGZXC1fkYGsAVytuLoJbVDHz0koBMVHcWDQEgbbnQiU6wOhOt4p7 lHkzcqvkjodOuYkTuf+iZG0vQEdalnGBqnRzfXsJ+p3ZvR1Zyosq9EhXpPnrA+31hnH+ fYIY03sSY96Ten1YlS9vh+u4Zptas2wEo+SDIsh2xGVjmlTqkkaj46oE6eB/zPCRdt/m 0W8w== X-Received: by 10.204.233.71 with SMTP id jx7mr1147463bkb.68.1371735349490; Thu, 20 Jun 2013 06:35:49 -0700 (PDT) Received: from [10.0.0.17] (94.168.216.87.static.jazztel.es. [87.216.168.94]) by mx.google.com with ESMTPSA id if11sm172619bkc.15.2013.06.20.06.35.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Jun 2013 06:35:48 -0700 (PDT) Message-ID: <51C30533.7050403@gmail.com> Date: Thu, 20 Jun 2013 15:35:47 +0200 From: Thorsten Scherler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: Cocoon 3.0 components References: <51C2AA15.1020403@apache.org> In-Reply-To: Content-Type: multipart/alternative; boundary="------------070001090002020700060005" X-Virus-Checked: Checked by ClamAV on apache.org --------------070001090002020700060005 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 06/20/2013 03:02 PM, gelo1234 wrote: > > I've got Cocoon site that hosts multiple www domains, all > based on the same sitemap.xmap with src="domain_X" check-reload="yes"/> > > so the configuration is as follows: > > > > > src="./domaina" check-reload="yes"/> > > > src="./domainb" check-reload="yes"/> > > > > > Is it still possible with C3 ? Or should I use some separate > blocks config ? > The problem with separate blocks config is that I want to use > empty URI (not different) for each site > > So > site1: http://www.domainA.org/ > site2: http://www.domainB.org/ > > NOT > > http://www.some.org/domainA/ > http://www.some.org/domainB/ > > under one C3 war (sitemap.xmap config). > > > I'd suggest to empower some reverse proxy in order to make things > easier here. > > > Reverse Proxy would give the opposite effect - collecting into one URL > from multiple domain servers. I would like to have > only ONE backend server that serves as the origin for multiple domains. > > With mod_jk/mod_proxy I can setup multiple workers for each domain but > where should I point them to serve my clients if having only one > backend server with C3 ? > > > Lets say I have a separate Cocoon block for each www domain. In C2.1 I > had a MAIN sitemap.xmap (Controller) that controlled which context to > mount upon different Hostname requests. > > In C3 the only way I could achieve that is passing through with each > request INFO about Hostname value. That is not very elegant > solution. But I cannot find any other. > > So either every would need additional : > > > > > > > > > > > > > > > > > > OR (a little bit more elegant and compact): > > > src="files/{jexl:cocoon:request.hostName}/homepage.xml"/> > > > > > I don't want to handle 100 VMs with C3 app for each www domain. That > would be very resource-expensive config. > > I would like to have only ONE C3 app for all www domains. so why not: Or even simply create a new language interpreter (formally known as module) which does the resolving. That has the benefit that you can use full blown java and use spring config file to do the mapping or a simple properties file. salu2 > > Greetings, > Greg > > > -- Thorsten Scherler codeBusters S.L. - web based systems http://www.codebusters.es/ --------------070001090002020700060005 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 06/20/2013 03:02 PM, gelo1234 wrote:

I've got Cocoon site that hosts multiple www domains, all based on the same sitemap.xmap with <map:mount uri-prefix="" src="domain_X" check-reload="yes"/>

so the configuration is as follows:

<map:pipeline>
              <map:select type="cutomDomainSelector">
                       <map:when test="domainA">
                            <map:mount uri-prefix="" src="./domaina" check-reload="yes"/>
                       </map:when>
                       <map:when test="domainB">
                             <map:mount uri-prefix="" src="./domainb" check-reload="yes"/>
                       </map:when>
               </map:select>
</map:pipeline>

Is it still possible with C3 ? Or should I use some separate blocks config ?
The problem with separate blocks config is that I want to use empty URI (not different) for each site

So
site1: http://www.domainA.org/
site2: http://www.domainB.org/

NOT

http://www.some.org/domainA/
http://www.some.org/domainB/

under one C3 war (sitemap.xmap config).

I'd suggest to empower some reverse proxy in order to make things easier here.

Reverse Proxy would give the opposite effect - collecting into one URL from multiple domain servers. I would like to have
only ONE backend server that serves as the origin for multiple domains.

With mod_jk/mod_proxy I can setup multiple workers for each domain but where should I point them to serve my clients if having only one backend server with C3 ?


Lets say I have a separate Cocoon block for each www domain. In C2.1 I had a MAIN sitemap.xmap (Controller) that controlled which context to mount upon different Hostname requests.

In C3 the only way I could achieve that is passing through with each request INFO about Hostname value. That is not very elegant
solution. But I cannot find any other.

So either every <map:match ...> would need additional <map:select ...>:

 <!--  e.g. the main / context -->

   <map:match pattern="">
       <map:select value="{jexl:cocoon.request.hostName}">
          <map:when equals="domainA">
            <map:generate src="files/domainA/homepage.xml" />
            <map:transform src="files/xslt/homepage.xslt"/>
            <map:serialize />
          </map:when>
          <map:when equals="domainB">
            <map:generate src="files/domainB/homepage.xml" />
            <map:transform src="files/xslt/homepage.xslt"/>
            <map:serialize />
          </map:when>
  </map:match>

OR (a little bit more elegant and compact):

<map:match pattern="">
            <map:generate src="files/{jexl:cocoon:request.hostName}/homepage.xml"/>
            <map:transform src="files/xslt/homepage.xslt"/>
            <map:serialize />
  </map:match>

I don't want to handle 100 VMs with C3 app for each www domain. That would be very resource-expensive config.

I would like to have only ONE C3 app for all www domains.

so why not:

<map:match pattern="">
            <map:generate src="servlet:{jexl:cocoon:request.hostName}/homepage.xml"/>
            <map:transform src="files/xslt/homepage.xslt"/>
            <map:serialize />
  </map:match>

Or even simply create a new language interpreter (formally known as module) which does the resolving. That has the benefit that you can use full blown java and use spring config file to do the mapping or a simple properties file.

salu2


Greetings,
Greg

 



-- 
Thorsten Scherler <scherler.at.gmail.com>
codeBusters S.L. - web based systems
<consulting, training and solutions>

http://www.codebusters.es/
--------------070001090002020700060005--