You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by William Bagby <wi...@adone.com> on 2001/02/23 18:49:12 UTC

C1 or C2?

I am having a bit of a dilemma here, maybe you folks can help me out.

We are running a number of template-based sites, and our current technology
has pretty much reached its' limit. We would like to migrate our site to a
Java Application server (probably Weblogic) + Cocoon.  The question is,
which version Cocoon should we use?  Cocoon 1.8.2 is suitable to our needs,
but what if we want to upgrade to C2 in the future?  Admittedly, I don't
have much hands-on experience with C2, but from what I've seen, upgrading C1
to C2 sounds like a painful proposition.

Is it worth my while to wait for a C2 release?  Or is there some way I could
set up C1 to make the (eventual) transition to C2 go more smoothly (or at
least less painful)?

Please advise...

William.

Re: C1 or C2?

Posted by Berin Loritsch <bl...@apache.org>.
William Bagby wrote:
> 
> I am having a bit of a dilemma here, maybe you folks can help me out.
> 
> We are running a number of template-based sites, and our current technology
> has pretty much reached its' limit. We would like to migrate our site to a
> Java Application server (probably Weblogic) + Cocoon.  The question is,
> which version Cocoon should we use?  Cocoon 1.8.2 is suitable to our needs,
> but what if we want to upgrade to C2 in the future?  Admittedly, I don't
> have much hands-on experience with C2, but from what I've seen, upgrading C1
> to C2 sounds like a painful proposition.
> 
> Is it worth my while to wait for a C2 release?  Or is there some way I could
> set up C1 to make the (eventual) transition to C2 go more smoothly (or at
> least less painful)?
> 
> Please advise...

If your site consists of the core XSP logicsheets and transformers, the migration
is alot easier than ColdFusion 4.0 to ColdFusion 4.5.  You will need to create
a sitemap (simple), and change a couple XML namespace declarations, and everything
will work again!  If you have invested alot in custom logicsheets, transformers,
and producers, then the change is more involved.

All that aside, here are some hard facts:

* Cocoon 1 is DOM based, and so requires more memory for large documents.
* Cocoon 2 is SAX based, and so requires the same amount of memory for large
  and small documents.
* Cocoon 1 has caching to speed up accesses (once a page is rendered, it can
  be served very quickly from cache).
* Cocoon 2 does not _yet_ have caching implemented, however for straight
  transformations with no XSP, can easily handle > 1,000,000 pages a day
  without caching if you have the right hardware.
* Cocoon 1 has very distinct rendering stages, so a page can take upwards of
  a couple of seconds to render one page.
* Cocoon 2 (because of the SAX model) does not have distinct stages (the
  processing on all stages happens concurrently), and usually takes a couple
  hundred milliseconds if you don't use XSP.
* The XSP model in Cocoon 2 is not optimized yet, so a page being generated
  by XSP can take over eight times as long as one being generated by a
  dedicated Generator.
* In Cocoon 2, the sitemap has to be compiled: that means it can be several
  seconds on the first access, but after that it is blazing.  Work is being
  done to precompile a site completely in Cocoon 2--including the sitemap.

I have an Athlon 750 MHz machine with 256 MB RAM, running Windows 2000 and
Sun's JDK 1.3.0_01.  Using Cocoon 1 for the same site (see www.infoplanning.com)
the first access to a page can spend roughly 650 ms while the page is rendered.
Using Cocoon 2 for the same site (remember, only a couple of namespace declarations
had to be changed), each access is roughly 120 to 240 ms per request.

Strategies for protecting yourself:

Stick to the following logicsheets: xsp, util, session, response, request, esql,
and sendmail.  The namespace declaration is the only thing that needs changing.
As much as possible try to stick with the standard technologies included.  If
you render to a non-text format for your output (e.g. PDF, SVG rendered as a
PNG or JPEG), performance will suffer regardless of which technology you use.

There are some truly amazing things that Cocoon 2 will allow you to do using
Actions, Readers, XSP, and Transformers.  Cocoon 2 is becoming much more close
to a Web App framework than Cocoon 1--although you will find alot more support
for Cocoon 1 right now.