This server is (as far as the authors know) one of the more complicated
TiddlyWeb (and
TiddlyWebWiki) servers extant. While it's primary purpose is to be a storehouse for
TiddlyWeb Documentation, it is also a testbed for
plugins and techniques for achieving a satisfying
TiddlyWeb experience.
This content is generated from one of several
TiddlyWeb instances mounted via
mod_wsgi on a Xen virtual host. Mod WSGI daemon mode is used so that the
TiddlyWeb is run under its own independent user.
Content is stored in SQLite, using the
sqlstore. Performance is enhanced using the
cachinghoster and
caching-store plugins. These perform two very different but complementary function:
- caching-store, where possible, caches the TiddlyWeb entities which are persisted to the store in memcached. After a first request for an entity for the store, as long as the entity does not change, subsequent requests come from memcached. Under certain conditions this can save time as the time to get data from memcached can be faster than getting it from the persistent store. (N.B: Under fairly light use conditions (like this server) the difference in time is negligible. In fact sometimes going to memcached can be slower. We use it here for the sake of testing.)
- cachinghoster caches the HTML file that is the wiki that is generated from a specific recipe and presents that wiki at the base url of the TiddlyWeb server. It performs a variety of heuristics to determine if it should:
- Tell the user-agent to continue using the copy it has in cache.
- Send the user-agent the static copy it has stored in its disk cache.
- Create the wiki anew by going to the store to get the required tiddlers (rewriting the cache in the process).
Because of weirdness with the way Apache handles '/' in the PATH_INFO part of urls, the
pathinfohack plugin is used to make sure that
tiddlers with '/' in their titles can be loaded and saved.
The
atom plugin provides Atom syndication feeds of any collection of tiddlers, including just one tiddler.
In addition to the editing (editing is available to
authorized users) capability provided by the wiki
serialization, editing is also provided by the
formeditor and
tiddlyeditor plugins. These are accessible from the HTML representation of a single tiddler. Formeditor presents a simple
<textarea> style form that allows the text of the tiddler to be edited. Tidddyeditor generates a
TiddlyWiki containing the current tiddler plus those
TiddlyWiki plugins required to do editing.
The
hwiki plugin is used to provide a non-javascript representation of this wiki to provide enhanced accessibility and an entry point for search engines.
Within the generated
TiddlyWiki, the
MainMenu,
PageTemplate,
ViewTemplate and
StyleSheet have all been updated to give a preferred look and feel. The
TiddlyWiki plugins include with
TiddlyWebWiki provide the required editing and saving functionality. The
CommentsPlugin provides support for comments.
twLink and
FancyMissingPlugin are quick hacks to add a serverlink to the command bar and order the missing tiddlers list by number of references, respectively.