cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans <Jorg.Heym...@12snap.com>
Subject RE: Sharing a cocoon instance to save memory
Date Fri, 29 Aug 2003 06:58:27 GMT
I don't know about the techniques of sharing jar files to save memory but
there is basically no immediate need to launch different cocoon instances
for different "customers". In the main sitemap.xmap you put something like

  <map:pipeline>
    <map:match pattern="customer/*/**">
      <map:mount uri-prefix="customer/{1}" src="customer/{1}/"
check-reload="yes"/>
    </map:match>
  </map:pipeline>


Each customer would be building his website in the mounted customer
directory on the same instance.

Hope this helps
Jorg

-----Original Message-----
From: Ryan Heise [mailto:rheise@it.uts.edu.au] 
Sent: Freitag, 29. August 2003 06:59
To: users@cocoon.apache.org
Subject: Sharing a cocoon instance to save memory

Hello cocoon folks, I have a question:

Suppose you're a web hosting company and you are hosting several cocoon
based websites. The problem is that each cocoon instance uses heaps of
memory.

Is there any way to share a single cocoon instance for all cocoon based
websites? Ok, you can put each cocoon website as a subdirectory of the
main cocoon instance and each subdirectory gets to have its own sitemap.
But what about the class files associated with each website? Must they
all go in the single shared cocoon/WEB-INF/classes directory? Is there a
way for all files related to one website to go in one subdirectory,
separate from the other websites which go on their own subdirectories?

Does JSP solve a similar problem? How does it solve it? I have never
used jsp, but it seems people often set it up so that the jsp servlet is
just loaded once, and each website only consists of a set of jsp files
without having to define their own servlet. That seems like a pretty
good way to do it, but I don't know how to do a similar thing in cocoon.

Before I finish, I have another question:

This web hosting company wants to save even more memory. Perhaps
disabling class reloading would save a lot of memory, if only there were
some way to still edit xsp files and not have to restart the whole
server to see the effects.

Option 1: is there a way to just "reload" one of the cocoon websites
without affecting the rest of the shared environment? So, ditch all the
class loaders associated with that website and create new ones?

Option 2: is it possible to optimise the current class loader's class
reloading technique? It really seems to use more resources than it
should. Hmm, do we really need a class loader for each class, or can we
use a class loader for each directory? That would be more efficient.

Just a thought.

Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message