Sign up for the Cocoon GetTogether 2006!

August 29, 2006

A few days are left to sign up at the (dirt cheap) price of 99 euro, for the annual Cocoon GetTogether conference.

I’ll be there, still thinking about what to present…


Paloose – Cocoon sitemaps in PHP

August 4, 2006

Synchronicity I guess…yesterday talking to a colleague we came to the conclusion that Cocoon pipelines are here to stay and today comes an announcement for Paloose, an implementation of Cocoon sitemaps, including many of our standard components apparently, in PHP5.

I haven’t had time to test it yet, if you do you’re welcome to add comments here.

The nice thing is that hosting PHP5 is much easier for small projects than hosting Java, so this might help make Cocoon pipelines a standard in wider circles.

Also, having a clean way of using the rich PHP-based templating system to process XML data (coming from Cocoon maybe) would be cool – I don’t know how good the integration can be with the current version of Paloose.

Of course this only does pipelines, it’s not a full implementation of Cocoon, but…pipelines are here to stay, so this is a Good Thing.

I shouldn’t end this without mentioning Popoon, another Cocoon pipelines system written in PHP. I’ll try to compare them in my Copious Free Time.

Nominate your favorite Open Source CMS

July 25, 2006

Nominations are open at – make sure you don’t forget the three (and a half) Cocoon-based CMSes that are out there.

Performance in a typical Cocoon application

June 30, 2006

cocoon-app-200607-small.jpgHow do you get good performance out of a Cocoon-based application? Generating each page on the fly is often costly, especially when pages are built from an aggregate of different data sources, which is a common case.

The drawing at the right (full-size version here) shows the structure of a typical Cocoon application. It comes from my what you need to know about Cocoon presentation at the Cocoon GetTogether 2004. Not cutting-edge stuff then, but it’s still valid as ever.

The key to performance with dynamically-generated websites is caching. Might sound obvious…I should maybe say intelligent caching instead.

In the case of and, which both run on live Cocoon instances, we’ve based many of our technical decisions on the cacheability of the pages. These websites do not have very high traffic on average, but we get big peaks of load when something’s announced on TV, so we need to be able handle sudden large bursts. It’s quite fun to see the peaks in bandwidth right after a TV announcement about these sites. At least when it works….but we’ve been doing quite good since the launch of nouvo in 2004.

Many “page gadgets” will kill the cacheability, but a website design where as much of the page as possible is stateless is the key to being able to efficiently cache things.

Do your website visitors really need personalized pages? Often not…and if you really need it, there are clever ways of implemeting personalization, like sending small chunks of javascript for the parts that need to be different for each visitor, or using Ajax or AHAH to send very smalll parts of personalized content. We’re using the latter technique on, sending small chunks of XML via XmlHttpRequest when a visitor is logged in.

Once your pages are cacheable, using the Apache mod_cache module as the front-end of your website (you don’t want to put Cocoon or servlets directly on the Web, right?) will do wonders, effectively serving static pages that can be each updated at different intervals, based on the HTTP headers of your Cocoon response.

In the end, this allows you to fine-tune the caching of each page or page part, directly from your Cocoon application, just by generating the appropriate HTTP headers and configuring the front-end cache correctly. Serving cached pages, you can then easily get several hundred pages per second from a “normal” Linux box, in our case we’re at 800 pages per second when tested locally from the (dual Xeon 2GHz Linux) server.

To summarize, structuring your site to have as much stateless content as possible, using a front-end cache controlled by HTTP headers, and including the caching tests in your final testing, will allow you to get the best performance for your dynamically-generated site. Minimizing the number of hits to your page-generating application will allow it to efficiently handle the really dynamic things.

In our case we don’t even use the internal caching features of Cocoon, or only very little. This would be the next step if we had more transaction traffic, by allowing us to cache partial pipelines as needed. But we haven’t needed yet, applying the above principles is more than good enough in our case.

You can find more information about configuring mod_proxy and generating HTTP headers for caching on the Cocoon wiki.

Update: fixed a few typos

Guess where?

April 26, 2006

some-planes-somewhere.jpgMaking cryptic statements about certain parts of the world seems to be commonplace for Cocoonistas these days, so here’s my mystery picture. You won’t break any neurons on it…

Having a busy but fun week!

Cocoon 2.1.9 is out

April 10, 2006

Thanks Carsten for making the release happen, and congratulations to all involved, the 2.1.9 release of Cocoon is available.

There are no revolutions in this release, but the many small changes still make a significant difference. The 2.1 branch is stable and for most of us it’s been the workhorse for quite some time, so no real need for revolutions there.

A not so small change is the rewriting of some of the CForms samples to use dojo for Ajax stuff. The Ajaxified dynamic repeater is a good example, where Ajax makes a big difference to the UI without being obnoxious.

I have contributed almost nothing to this release, between a hectic end of year 2005 and lots of teaching in this beginning of 2006 I didn’t have much time. I’ll hopefully be more active in the next months.

Update: we found out (too late) that the samples of the Ajax block are broken when using the default settings in this release. The new “template” block must be enabled (as described in INSTALL.txt) for these samples to work.

Congratulations Hippo!

March 29, 2006

Arjé Cahn announces the first Open Source release of their Cocoon-based Hippo CMS.

The Amsterdam Plot is now fully solved! Well, almost – there are signs of more exciting announcements in the pipeline, I’m staying tuned to their weblog!

Together with Daisy and Apache Lenya, this makes (at least) three important OpenSource CMSes based on Cocoon! User expectations vary a lot when you talk CMS, so in my opinion it’s good to have diversity – also because these guys know each other well enough to take advantage of the friendly competition to improve their products.

And don’t forget the Apache Forrest publishing system, which is also built on Cocoon and works wonders in publishing and organizing content from very diverse sources.

Activity in the Cocoon project itself has slowed down in the last year, and these news show that it’s more a sign of maturity than anything else. Cocoon 2.1.x is “done” in many ways, future versions will bring big improvements, especially in terms of ease of development, but the power and stability of these CMSes is a testimony to the quality and maturity of the 2.1.x code.