Sofawiki Architecture
skin layer | skin PHP and CSS | |||||||
style layer | wikitext | |||||||
transclusion layer | templates | |||||||
database layer | swFilter swQuery swRelation swRelationFilter swExpression | |||||||
object layer | swWiki | swUser | ||||||
swRecord | ||||||||
swPersistance | swDB | swBitmap | swParser | swFunction | ||||
physical layer | revisions | current | files | cache | indexes | bloom | monogram | queries |
Includes in a web request
- index.php
- api.php
- inc/*.php
- inc/functions/*.php
- inc/parsers/*.php
- inc/system-defaults-*.php
- site/configuration.php
- site/functions/*.php
- inc/ramdisk.php
- inc/image.php
- inc/special/[$action].php
- inc or site/skins/[$skin].php
Physical data
Everything site specific is in the site folder.
Do not modify content in the inc folder. It may be erased on update.
Complete representation of the website
- site/revisions/*.txt
- site/files/*.*
- site/functions/*.*
- site/skins/*.*
Cache of current revisions
- site/current/(md5hash).txt
- site/current/(revision).txt
Query cache
- site/queries/*.db
Image cache
- site/cache/*.*
Access logs
- site/logs/
Indexes
- site/indexes/bloom.raw (big binary bitmap)
- site/indexes/monogram.db (monograms)
- site/indexes/records.db (copies of revisions, access is faster than single file)
- site/indexes/urls.db (index of names)
Essential indexes (are recreated immediately if missing
- site/indexes/bloombitmap.txt (bitmap of bloom indexed revisions)
- site/indexes/currentbitmap.txt (bitmap of current revisions)
- site/indexes/deletedbitmap.txt (bitmap of deleted revisions)
- site/indexes/indexedbitmap.txt (bitmap of indexed revisions)
- site/indexes/protectedbitmap.txt (bitmap of protected revisions)
.txt is source file or serialized php object
.db is sqlite3 db or Berkeley db