cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Sitemap and Links...
Date Sat, 08 Jan 2000 00:30:48 GMT
Angel Faus wrote:
> 
> >Wrong. A counter example: suppose you do a getResource() at
> >servlet.init() and you have mounted your servlet to two virtual hosts,
> >each one hosted on a different machine. Where is the resource? how do
> >you map it?
> >
> >
> >To avoid such a problems with heavily distributed 3-tier systems, the
> >Servlet API rules that the instance of a servlet may be hooked to one
> >and only one servlet context. Period. Ask your favorite servlet guru if
> >you don't trust me :)
> >
> >
> >> Apache-JServ allows one servlet zone to be
> >> mounted in many virtual hosts.
> >
> >
> >Yes, but this could be done (with some problems, because of Servlet 2.0)
> >and, remember, jserv is not able to make callbacks or to access web
> >server resources if the two are located on different machines.
> >
> >> Why can't we build something into the
> >> sitemap to accomodate site designers who want this sort of functionality?
> >
> >because if europe.news.com and africa.news.com share the same resources,
> >you should have two cocoon instances, each one associated with a
> >different servlet context (virtual-host), that share the same files on
> >the disk.
> >
> >Look: I'm not saying I like this (read the servlet expert group mail
> >digests for my comments on that), but we could not find a simple
> >solution for the problem and, besides, there are not many servlets that
> >are as big and complex as Cocoon.
> >
> 
> Does Servlet 2.2 allow to make internal redirect so, for instance, we can
> redirect (internally) europe.news.com to news.com/continents/europe so we
> can handle all requests with the same cocoon instance?? (mod_perl does allow
> it). Maybe this could do the trick. 

You guys.

I think that a very simple mod_rewrite hack will do the trick to rewrite 

 europe.news.com to www.news.com/continents/europe

that way, you can safely have one Cocoon and you can sleep well tonight
:)

> There must be some solution!!!. As an
> example, my current primary job is as head webmaster of a medium-big site,
> which has currently 21 virtualhosts running in a single machine (like
> europe.news.com,...). We want to move from our current XML publication
> system (a modperl coded one) to Cocoon as soon as we get 1.6. But I think
> this problem (the need of one cocoon instance for each virtualhost) could be
> a serious inconvenience, since we probably would need more hardware if we
> need one Cocoon (RAM, etc..) for each virtual host. I am right??

If the virtual hosts share most resources, yes, but the mod_rewrite
trick will remove your pain.

If the virtual hosts are totally different, having two cocoon will not
take that more memory than having one that handles both. Cocoon itself
should take less than 1 Mb of RAM, everything else is the cache but you
can tune your JVM/Cocoon to reduce the memory for the cache. Also not
that Cocoon is not (yet) optimized for size.

Anyway, think about it: having xxx.news.com sites is a different way of
writing an URL, so url-rewriting is the key.

On the other hand, I'm concerned about two completely different virtual
hosts that reside on different web servers and access the same servlet.
That is what I want to avoid. But this is not something you guys are
concerned about. It's more an intranet-like approach.

> The worst thing is that probably this problem is quite general... we are not
> the only ones using *.news.com-like virtualhosts. :(

Be happy, man, the solution is not that complex :)
 
> >> Next question - it would seem that the general consensus is towards
> >> Pier and Stefano's proposed map syntax, with the 'prefix' tag as
> suggested
> >> by Brett. Is that so? If so, let's work on a pseudocode algorithm for
> >> using the sitemap and then implement it already. I can't see anything
> >> horrendously difficult there (not anything as hard as, say, XSP :))
> >
> >+1 for me.
> >
> >I'll be very busy in the next two weeks since I have to prepare a bunch
> >of papers for the two conferences XML 2000 and ApacheCon 2000, then I
> >have a couple of juicy consulting contracts and a piece of my thesis to
> >write... god, lots of stuff.
> >
> >I'm doing 1.6 really soon and then I'll let you guys play the big drama
> >:)
> >
> >[Brett, it's your time to earn that mail address :)]
> 
> I am waiting for 1.6... really!! :)

I have a small problem with an XSP sample. As soon as that is ready,
I'll do the release.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message