[Paper Review] Bringing Web Time Travel to MediaWiki: An Assessment of the Memento MediaWiki Extension
This paper presents the Memento MediaWiki Extension v2.0, which integrates the Memento Protocol into MediaWiki to enable web time travel by allowing users to access past versions of wiki pages using datetime negotiation. Despite counterintuitive performance expectations, Pattern 2.1 (3 requests) outperforms Pattern 1.1 (2 requests) due to MediaWiki’s internal architecture, and the extension supports full HTTP error codes, optional Memento headers, and prototype support for temporal coherence of embedded resources.
We have implemented the Memento MediaWiki Extension Version 2.0, which brings the Memento Protocol to MediaWiki, used by Wikipedia and the Wikimedia Foundation. Test results show that the extension has a negligible impact on performance. Two 302 status code datetime negotiation patterns, as defined by Memento, have been examined for the extension: Pattern 1.1, which requires 2 requests, versus Pattern 2.1, which requires 3 requests. Our test results and mathematical review find that, contrary to intuition, Pattern 2.1 performs better than Pattern 1.1 due to idiosyncrasies in MediaWiki. In addition to implementing Memento, Version 2.0 allows administrators to choose the optional 200-style datetime negotiation Pattern 1.2 instead of Pattern 2.1. It also permits administrators the ability to have the Memento MediaWiki Extension return full HTTP 400 and 500 status codes rather than using standard MediaWiki error pages. Finally, version 2.0 permits administrators to turn off recommended Memento headers if desired. Seeing as much of our work focuses on producing the correct revision of a wiki page in response to a user's datetime input, we also examine the problem of finding the correct revisions of the embedded resources, including images, stylesheets, and JavaScript; identifying the issues and discussing whether or not MediaWiki must be changed to support this functionality.
Motivation & Objective
- To implement the Memento Protocol in MediaWiki to enable access to past versions of wiki pages using datetime negotiation.
- To assess the performance impact of different Memento negotiation patterns (Pattern 1.1 vs. 2.1) within MediaWiki’s architecture.
- To extend the Memento MediaWiki Extension with features such as full HTTP 4xx/5xx error code support, optional Memento headers, and 200-style negotiation (Pattern 1.2).
- To investigate and prototype support for temporal coherence of embedded resources like images, CSS, and JavaScript in historical wiki pages.
- To identify and address architectural limitations in MediaWiki that prevent full temporal consistency of past page views.
Proposed method
- Implemented the Memento MediaWiki Extension v2.0 to support TimeGate, TimeMap, and Memento resource types using MediaWiki’s existing API and hook system.
- Evaluated two 302-based datetime negotiation patterns: Pattern 1.1 (2 requests) and Pattern 2.1 (3 requests), measuring performance impact on page load.
- Used MediaWiki’s hook system, particularly the ImageBeforeProduceHTML hook, to attempt dynamic loading of historical image revisions based on requested datetime.
- Explored the use of the $file->getHistory() method to retrieve and assign historical image File objects for correct rendering at a given timestamp.
- Investigated the feasibility of using Memento headers and TimeGates for embedded resources (CSS, JS) to ensure temporal consistency of rendered pages.
- Proposed two architectural approaches: internal MediaWiki datetime negotiation for embedded resources or full Memento protocol support across all resources.
Experimental results
Research questions
- RQ1How does the performance of Memento’s Pattern 1.1 compare to Pattern 2.1 in the context of MediaWiki’s request handling and internal routing?
- RQ2Can the Memento MediaWiki Extension be deployed with negligible performance overhead on existing MediaWiki installations?
- RQ3To what extent can embedded resources (images, CSS, JavaScript) be synchronized with the historical revision of the main wiki page to achieve temporal coherence?
- RQ4What modifications to MediaWiki’s core or extension architecture are required to support full temporal consistency of embedded resources?
- RQ5Is internal MediaWiki-based datetime negotiation for embedded resources more performant than relying on external Memento TimeGates?
Key findings
- Pattern 2.1 (3 requests) performs better than Pattern 1.1 (2 requests) in MediaWiki due to internal request routing and caching behaviors, contrary to initial performance intuition.
- The Memento MediaWiki Extension v2.0 has a negligible performance impact on both current and historical page access, confirming its scalability for production use.
- The ImageBeforeProduceHTML hook’s $time parameter is currently unused and misdocumented, as the timestamp string is not processed by the underlying function.
- A prototype solution using $file->getHistory() enables dynamic loading of historical image revisions, but requires cache purging to take effect.
- MediaWiki currently lacks hooks to modify or inject historical CSS and JavaScript during page rendering, requiring collaboration with the MediaWiki development team.
- Two viable architectural paths exist for achieving temporal coherence: internal MediaWiki negotiation (preferred for performance) or full Memento protocol support across all resources (standardized but higher latency).
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.