Mobile app version of vmapp.org
Login or Join
Gonzalez347

: MediaWiki VCS backend? (Preferrably DVCS like Git or Mercurial) As a long-time MediaWiki user, I would like to start a new wiki project because I really appreciate MediaWiki maturity and very

@Gonzalez347

Posted in: #Git #Mediawiki #Wiki

As a long-time MediaWiki user, I would like to start a new wiki project because I really appreciate MediaWiki maturity and very flexible and powerful capabilities. But I have doubts that I want to take all of MediaWiki infrastructure on board for the new project.

Let's say, I would really like to have a VCS backend to have all wiki edits in one place. As far as I know, MediaWiki supports RBDMS backends only. I've recently came across an old question asked about four years ago. After playing a while with Gitit and Ikiwiki, I feel that Gitit is a better choice allowing integration with GIt or Mercurial, and it's not a static compiler unlike Ikiwiki. Gitit seems to be a much lighter solution than MediaWiki, however I'm afraid it's not even a 10% powerful comparing to MediaWiki: I couldn't compare revisions through the web interface, not sure if I can use categories or templates that are crucial to me, just a few plugins. But I really love the idea of having a VCS backend, because I can sync with the backend locally, can easily export it and use all Git or Mercurial features.

I do remember there is a Git remote helper for MediaWiki that is a bridge-like solution between MediaWiki API over HTTP and Git. I tested it as well, and I had a strong feeling that this Git extension is very raw and seemed to work very slow causing even restart Git cloning in some cases (probably due to the real wiki performance, not sure), and probably might cause another issues. I had never managed to get a full history dump unfortunately.

Is there a way of using Git or Mercurial as a real MediaWiki backend?

EDIT:

I seem to look for an easy Wiki full data replication solution (must have: articles, talk pages, templates, files; optional: probably user database (assuming the VCS stores the user info itself, or maybe something like Mercurial ACL, whatever) and other minor things that aren't tightly related to the wiki content per se) along with an easy to migrate infrastructure.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Gonzalez347

2 Comments

Sorted by latest first Latest Oldest Best

 

@Goswami781

MediaWiki has a storage abstraction layer that makes this technically possible (the linked page talks about using external databases but it's actually not limited to that; see the documentation of the ExternalStore class for details). You would have to write your own ExternalStoreMedium subclass. The wiki would still have an RDBMS backend, of course, but the page text would be stored in git instead.

In practice, I strongly doubt this would make things simpler for you.

10% popularity Vote Up Vote Down


 

@Hamaas447

I think there isn't (using off-shelf software) for the following reasons.

Sql and git are very different storage systems by design.

Sql is about storing lots of deeply interconnected data in a single big lump of a file. Thus allowing efficient indexing and searching.

Git is about storing programming text in many small files with the unwritten assumption that the content of those files is as independent as possible. Thus allowing easier merging because changes in one file should generally not effect other files (in an ideal world at least).

MediaWiki's design is tightly integrated into using a RDBMS as storage and MySQL in particular. They could have choose any number of other storage systems but they choose this one and that choice likely effects many parts of the system.
As mentioned on their wiki, there was a project underway up to about 2 years ago to develop a git backend feature but that appears to have been abandoned.

If the developers don't support it then your only other option is to use something that looks like an SQL server to MediaWiki but is actually a bunch of loose "text" files that can be managed by a (D)VCS such as git.

ODBC connectors exist to support collections of flat files on most if not all platforms but their capabilities may not be complete enough to pose as an sql server. The problem is that MediaWiki is not expecting any 3rd parties to alter it's data tables in any way so accepting a patch to those files from a 3rd party would have to be done in such as way as to not break that internal consistency of the database.

That is certainly possible for some, especially for simple, applications but it is very much application dependent and MediaWiki is fairly complex.

You have the weigh the specific benefits of using one of the available "build for git" style wiki's vs the features they don't have compared to MediaWiki.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme