MediaWikiLite

From Organic Design wiki
Revision as of 21:31, 7 January 2008 by Rob (talk | contribs)

The idea of MediaWikiLite is to allow the current MediaWiki codebase to run as a standalone server without requiring a database server or web-server. This forms the foundation of a number of alternative uses for the MediaWiki software which it is currently too resource intensive to be used for currently.

  • Personal wiki: Personal desktop wiki's are becoming very popular, but they do not use the MediaWiki parser, and making a fork of the parser code defeats the purpose.
  • Embedded devices such as PDA's, iPod's and iPhone's can only run lite applications effectively and getting MediaWiki onto them would be very useful, especially if it's designed to synchronise with a web-based mirror when connection available.
  • PeerPedia: A lite version of MediaWiki is required to make it a possible candidate for a client side wiki interface to a P2P article space.

This extension creates a new database subclass which allows a MediaWiki to work from an SQLite database instead of MySQL. MySQL is good for large centralised sites serving many clients, but we'd like MediaWiki to be able to run on small local systems such as iPods or iPhones. MySQL is the main obstacle preventing us from creating a light-weight MediaWiki install which would also be a big step towards our Peerpedia idea.

Replacing the Web Server

This may require FastCGI or a similar alternative because there is problems with functions such as header() which have no effect when running from command line but the function still exists so it can't be replaced. Unless there's some way of overriding built-in functions, this may not be possible.

NanoWeb looks like a good solution for the this. It's a web-server entirely written in PHP and comes with a number of modules such as a ReWrite clone. It can execute CGI scripts using a normal CGI module or a FastCGI module. Also the modules looks very easy to write so a module specifically designed to maintain a MediaWiki instance in memory could be written.

SQLite Installation

  • To install SQLite on a Debian based system, use apt-get install php5-sqlite.
  • Code base would need to be patched to allow SQLite to work for a wiki installation since extensions are added from LocalSettings.php
  • Adding DatabaseSqlite.php to includes doesn't help because the includes need to be added to the autoloader list
  • We really want SQLite3 but there's currently some problems installing it, will check it out with version 2.x first

Development Notes

I've created a local MediaWiki-1.11 codebase copy that I can modify without affecting other local wikia. The config/index.php MediaWiki install script needs to be hacked to add an SQLite option. I added the following to the end of the $ourdb array:

{{{1}}}

Currently running through the install procedure fails when selecting SQLite because there's still more methods to fill out in the DatabaseSqlite class.

See also