I've been working on a bare-bones, back-to-basics implementation of a
server side for TiddlyWiki. Initially it was called mo'ass (mother of
all server sides), with special pronunciation instructions from
Jeremy, but I decided to give the project the easier to explain name
of TiddlyWeb.
The two primary goals of TiddlyWeb are:
1. Make a web-service style server-side that minimizes application
logic in the server[1], providing a resource oriented framework for
managing tiddlers. The final implementation will hew as closely as
possible to good HTTP behaviors and, with any luck, will be a useful
reference for an emerging standard for hosting and managing tiddlers
on the network.
2. Provide a simple but effective authentication and authorization
system for these tiddlers that are on the network. Jeremy has ginned
up this notion of recipes and bags. Recipes in TiddlyWeb are similar
to, but not quite the same as recipes in cook. Recipes are lists of
bags+filters. The result of processing a recipe is a workspace, which
is a useable list of tiddlers representing some purpose. A bag is a
container for tiddlers with specific access restrictions on who can
read and write from and to the bag. A filter is a query string that
limits which tiddlers from this bag are used in a recipe. These
concepts get a bit more clear when you play with it (see below).
In TiddlyWeb a list of tiddlers can be presented as a TiddlyWiki when
the right content-type is requested.
I have a working prototype of most of 1, and the bones of 2. There is
no authentication or authorization, it is a free for all, but recipes,
bags and filters operate to create useful workspaces. Here's one:
http://peermore.com:8080/recipes/TiddlyWeb.wiki
A friend of a friend once passed out the wisdom that the secret to
effective information technology is acknowledging that it is a simple
matter of moving data from here ... to here. I can already tell that
TiddlyWeb is going to be a very useful tool for moving data around and
presenting tiddlers and TiddlyWikis in new ways. I'm especially
intrigued by the possibilities of multiple people running multiple
workspaces operating on shared datasets.
If you find all this interesting, you can help out and determine where
next to apply work in three ways:
1. Check out the demo I have running on my server:
http://peermore.com:8080/recipes/TiddlyWeb.wiki#PlayAround
See what works, what's broken, what needs more explanation. Content
you edit there will be synchronized back to the server if a) you edit
existing tiddlers b) you create a new tiddler by linking from an
existing one.
2. Check out the code and run your own server.
http://svn.tiddlywiki.org/Trunk/contributors/ChrisDent/experimental/TiddlyWeb/
The code has been tested with Python 2.4 and 2.5. It requires selector
and simplejson. See README and RUN to see about making it go. There is
a script in the root of the checkout called 'demo.py' which will
startup a server using much of the same data I have running on
peermore.com.
3. Check out the code, have a look round, run the tests (see TESTING),
look at the TODO and maybe write some code.
In any case, respond here if you have any questions, comments or
thoughts. I warn you: this is pre-alpha code, it may blow up in your
face, it may operate in ways that make no sense and defy expectations.
Do not use this code to support any important work. Do not develop
code based on this code which relies on APIs in this code and be
disappointed when the APIs change later.
Key issues in the code right now:
* No support for file locking in the 'text' data store, which means
there could be write collisions.
* No support for revision handling in the model, meaning there's no
support for collision handling or reverting changes.
* No access control, you can write all over the place. (If this proves
to be a problem I'll take down my test server and implement a quick
HTTP Basic Auth hack)
* The client code does not think in terms of recipes and bags, so
workspace generation and synchronization is not as full-featured as it
could be.
In the not too distant future I hope to host TiddlyWeb's development
Wiki in TiddlyWeb.
[1] I've not done a full review, but my impression is that this is key
differentiator between TiddlyWeb and other server-side
implementations. My hope is that because TiddlyWeb is a simple box
with some knobs on it for getting and putting data and tries to be
RESTful that it will support unexpected use cases and expand the web.