Swank Wiki
Recently Visited

Swank v0.04.04

Type: task
Description: wikifarm enhancement
Status: New
Priority: 4
Assigned:

Notes

Note: swank already supports a form of wiki farm, in which a single installation can support multiple document roots, but the configuration is done in the apache conf file by setting the document root for each virtual host.

Apache uses the first virtual host as a default for missing or unrecognized Host: request headers.  This can be used with wildcard DNS to do some automatic wiki farming, without needing to alter the apache configuration.

The enhancement needed is for the virtual host to be recognized, and for the system to route the request to a virtual document root somehow.

The difficulty is making sure the virtual site has access to all the minimal files it needs to function, and that it is indexed as a separate unit.

This should also be used for translations, which each language being a different site, with fallbacks to the main (or other related) language. For translations, it would make sense for the site to be picked by something other than the url, such as a path component or a cookie.

Design

Swank::WikiFarm

overrides handler --

  • set $sys->{root} based on $io->hostname

method for setting up new wiki

  • verify hostname resolution ok
  • create root directory (lucene will autocreate), and copy in minimal files from template dir
  • Need a sub-root file (configurable?) for storing hostname -> root dir mapping

Maybe the best way to do the configuration is to allow a page to be non-overridable/non-translatable. i.e. there is only one copy of that page, used by all sites, and thus it can contain the essential configuration for the sites.

Configuration:

  • site resolution method (sub-domain, path component, cookie)
  • list of sites (record for each)