Okay here's my latest idea. (I know, many of us have been thinking about this for awhile, but here's a few more concrete ideas.)
In the WikiDB, we introduce a new page meta-data item called type. This is (at least more-or-less) immutable (pages don't change type during their lifetime.)
All the regular wiki-pages (everything, right now) has a type of something like 'wikipage'.
(One could allow different wiki-pages to use different mark-up schemes. E.g. one could imagine page types of 'wikipage/structured-text'.)
But my real motivation (today) is to allow the WikiDB to be used to store images and other "attachments".
If an image were uploaded to or generated (e.g. TexToPng) for this page, for example, it could be stored as a "page" in the WikiDB. It's page type would be, e.g., 'image/gif'. It's page name could be something like '!PageTypes/attach1.gif' (indicating that it's a subpage, or attachment of page PageTypes. (Alternatively, that it's an attachment could be indicated via the use of yet another new meta-data item, e.g. parent.)
Advantages:
- We already have the WikiDB page store implemented and working. It provides good (hopefully secure, race-free, bug-free) storage for data and associated meta-data. There's no point in having to write a whold 'nuther database-ish store just for image files.
- Much of the meta-data we would want to keep regarding attachments is the same as what we keep for wiki-pages: author, modification time.
Disadvantages:
- WikiDB is wiki-page centric. (Images don't have links, etc...)
Issues:
-
Administration. How to keep from having too much cruft around? How to keep from becoming a WaReZ dump?
-
EditPage
could list attachments for the page being edited (and allow
their deletion.) A plugin could also be used to list page
attachments. - Most everything except real wiki-pages should probably have to be attached to a wiki-page.
- UserAuthentication: only allow authenticated users to upload attachments.
- Only allow "small" attachments.
- Quotas? per page/ per user/ global.
-
- Coding. Lots more coding, deep in the guts of WikiDB and the backends would be required. (Page type really needs to be a column in the SQL schema.)
- Maybe need one more meta-data item to tag dynamic/temporary objects which can be safely deleted after a period of non-use.