Calvin Hendryx-Parker: Hands on with Multisite Management using Lineage

published Oct 30, 2014, last modified Nov 16, 2014

Talk by Calvin Hendryx-Parker at the Plone Conference 2014 in Bristol.

I am CTO at Six Feet Up. Doing Plone since 2003. Lineage was one of my first contributions.

Lineage is an add-on for Plone. Enabled by the pieces that are built into Plone, like INavigationRoot, IPossibleSite, together as IChildSite. So we are using the ZCA (Zope Component Architecture).

With Lineage you create one site and lots of sub sites for departments. Advantages compared to having lots of Plone sites:

  • You only need to upgrade Plone once.
  • You can share content among the sites. You can link to it in the TinyMCE editor.
  • Performance is better: you get a smaller footprint for all sites combined.

Disadvantages:

  • Want to split them up into different Plone sites? That is a bit more difficult.
  • Add-ons and configuration are global, not per sub site, so your sites need to be really alike.

There are various add-ons/extensions that build on Lineage, for example lineage.themeselection for giving sub sites a different theme.

Add collective.lineage to the eggs in your buildout. Activate it in the add-ons control panel. Go to a folder, to the actions drop down and enable this folder as a sub site. Within this folder, the home will be this folder. You can add sub sites within sub sites if you want. You can exclude a sub site from navigation if you want to.

I want to show you some cool tricks you can do.

You can use custom site types. As long as they are IFolderish types, you can enable a sub site on it. At Penn State we used that to ease creating a new course.

Some add-ons:

  • lineage.registry, for storing some config per site
  • lineage.index: adds a separate index to the catalog per site.
  • Resonate is new and does moving and syndicating to sub sites.

With Resonate it is possible to move content between sub sites, via the workflow, giving control to the content managers of the sub sites.

With Resonate you can syndicate content to various sub sites, still using standard Plone workflow machinery. A teaser of a news item can then be shown on the other sub sites, where they point to the original item, so that one remains the canonical one, which is good for SEO. The editor can see which sub sites accepted and rejected the share.

How does it perform? I set up two Zope instances, one with 100 Plone Sites, one with 1 Plone Site and 100 sub sites. Advantage of Lineage, with blank sites: about 9 MB against about 130 MB. Startup memory did not differ much, slightly better for Lineage. (Audience: may be influenced by the ZODB cache size too.)

Lineage is actually Plone 5 compatible. Version 2.0 released last night.

Code: https://pypi.python.org/pypi/collective.lineage

Example usage: http://www.la.psu.edu

For migration from the old separate sites to sub sites we used transmogrifier.

Watch the video of this talk.