Jump to content

User:Leucosticte/Inclumedia2

From mediawiki.org
Project
Inclumedia2
Component Extension:MirrorTools, revision, import, etc.
Creation date 2014-01-15
Author(s)

Leucosticte

Document
status
ongoing
Implementation
status

Inclumedia is an embyronic MediaWiki wiki farm. It will consist of Inclumedia projects such as Inclupedia, Incluversity, etc., each of which will be a mirror, a supplement, and to some extent a fork, of Wikimedia projects. The basic approach to creating all of these different sites will be identical, and similar software (MediaInclu, MirrorTools, etc.) will be used for all of them. It seems desirable to do technical planning on MediaWiki.org to reduce fragmentation and to avoid the problem that Wikimedia encountered, in which it was later necessary to move a bunch of technical content from Meta-Wiki to MediaWiki.org that might as well have been created at MediaWiki.org to begin with.

Inclupedia

[edit]

Since Inclupedia is the flagship Inclumedia project, the rest of this discussion will focus on its implementation. The target date for Inclupedia's proof-of-concept to be completed in 15 July 2015.

Specifications

[edit]

The primary keys for user, revision, recentchange, etc. for Inclupedia should probably be started at some number much higher than what it's anticipated Wikipedia will use any time in the foreseeable future. It appears that Wikipedia's rc_id and rev_id are already at or close to 600 million, so to future-proof it, it should probably be changed to a BIGINT and started at 1 quadrillion.

This could cause issues if revisions are imported from eninclu to enwiki. There could be a table mapping one to the other, if necessary. Better yet, just use a field, and have the functions (e.g. in DifferenceEngine.php, perhaps) use that field if need be.

There's pretty much going to be a global with all the different parameters from the API function, that gets used by all these different hook functions.

Preserving data

[edit]

Before any edit is to made to the local wiki, it should be saved to another database table that is strictly for attempted edits. This way, no matter what snafus happen, we never lose anything. Extension:ContributionsBackup will be developed for this purpose.

Bugs

[edit]

See https://bugzilla.wikimedia.org/showdependencytree.cgi?id=60084&hide_resolved=1

New hooks

[edit]

These hooks are run right before database writes.

Hook Location Description
Inclupedia/Hooks/RevisionInsert Revision::insertOn() Before a revision is inserted into the DB
Inclupedia/Hooks/UpdateRevisionOn WikiPage::updateRevisionOn() Before the page record is updated to point to a newly saved revision
Inclupedia/Hooks/BeforeRecentChangeSave RecentChange::save() Before the recent change data is written to the database
[edit]
  • bugzilla:60084 - Implement all features required for creating Inclupedia (tracking)