Jump to content

MediaWiki Performance Optimization by Reducing Traffic and Server-side Calculation

From Meta, a Wikimedia project coordination wiki

Personal Info

[edit]

Name

Shtriter Andrew

Email

Shtriter@gmail.com

ICQ

306035039

Project Title

[edit]
MediaWiki Performance optimization

Synopsis

[edit]

The aims of the project are:

  1. Improve UI of Wiki-based sites – change MediaWiki_look_and_feel taking into consideration Web 2.0 requirements.
  2. Optimize Browser-Server Dialogue that will help to avoid unnecessary server calculations, obviate conflicts of the simultaneous editing, decrease use of traffic and speed up page downloads and preserve existing caching scheme.

Benefits

[edit]

I will create new monobook-based skin that will be divided into separate blocks. Each of them will be able to talk with server using the Client API to get important data from server without reloading a page. That approach will also enable many actions to be done avoiding server interconnection (“Printable version”, “Permalink”…) or only sending results to server (password and upload dialogs, view/edit mode switching and so on).

Drawbacks

[edit]
  • User will not be able to save wiki page (as static html), straightforwardly, since the separated xml data may not be saved. --Ans 08:07, 8 May 2008 (UTC)[reply]
    • May be no problem with Firefox, since it save the current rendered html contents, but I'm not sure with IE. --Ans 08:16, 8 May 2008 (UTC)[reply]
    • A solution may be to provide non-AJAX/static-html link as a complement to printable link, but this still be non-straightforward in saving page. --Ans 11:54, 8 May 2008 (UTC)[reply]
    • Another solution may be to include those data in <... src=...> tag. This may be possible with json data format, but not yet test. --Ans 05:14, 9 May 2008 (UTC)[reply]

Deliverables

[edit]
  1. Query JS Library – set of functions used for Browser-Server Dialogue.
  2. Advanced XHTML skin – monobook-based skin with the improved UI: various js-powered popup tooltips and hideable menus and dynamic customizable user color schemes. Skin will be written in Strict XHTML with external *.js files and stylesheets that will be suitable for using as separate library.
  3. Documentation – comprehensive description of «Query JS library» and skin-creation Guidelines.

Project Details

[edit]
  1. The Library will be written in JavaScript and will implement Client API query.php. Rarely used functions will be downloaded on-demand. If some extra features are requested (such as client-side XSLT, smart history and so on) the Library can use some 3-rd party’s libraries.
  2. Advanced XHTML skin due to Wiki Skins format will be written in PHP and AJAX. It will be highly integrated with Query JS Library and use it for server interconnection. I will change default monobook skin in order to provide multi-stage download and simultaneous requests.

Project Schedule

[edit]
Step Description Results Duration
1 Getting in touch with mentor. Choosing desirable way of project development Requirements specification, wish-list and feature requests 1-3 days
2 Creation of the JavaScript library that uses query.php and/or XML representation of wiki markup for server requests and transforms received data to XHTML Query JS Library 7-21
3 Adaptation of the default monobook skin to the new requirements. This step will also include blocks interaction implementation and will be characterized by the wide use of the new Query Library that was created on the previous step. Advanced XHTML monobook-based skin (UI functions may be released separately if necessary) 7-21 days
4 Smart UI creation (i.e. menus, hints, dynamic styling and so on). 7-21 days
Total: Complete solution for MediaWiki Performance optimization. Each step includes time for documentation and debugging Registered project at SourceForge that will include all-in-one Performance optimization solution and separate archives with skin and lib(s) 22-66 days
Notes:
Minimal project duration is possible, assuming that project will take not less the 8 hours of intensive development each day. Maximum can be easily calculated taking into consideration that such extreme development is not always possible and as known all projects take about pi times longer to complete. In any case the deadlines will not creep up on me.

BIO

[edit]

I am third year student at the Togliatty State University, Russia. My major is Automation of technological processes, Physicotechnical institute. I have more then 7 years of programming experience in (Object)Pascal, VB and C++. After getting a job in my university I’ve started the development of internal AIES php/mysql project in the small team headed by experienced developers. The project was successfully finished after the year of intensive development. It led to my first career promotion and intensive studying of other web-programming languages: perl and python. I gained useful experience not only in web-development and understood the advantages of using Linux and version control system for programming. About one year ago I’ve began to use AJAX and XSLT in my web-developments.

My brief summary is available at User:Shtriter.

At a first time I've used Wikipedia as educational resource for getting necessary information. AJAX and List of portable applications pages had a great impact on me, in spite of I haven't submitted my ideas until the beginning of SoC 2006.

About six month ago I've started the development of the Educational Environment - prototype of my graduate work. My tutor and I decided that MediaWiki on a stick will be the best engine for it.

Though I do share F/OSS ideas, I haven't previously contributed to open source projects because I have no idea what foundation would like to work with me. I'm sure that my programming experience is enough to be able to complete the project, so Summer of Code is my real chance and my great opportunity.

I have chosen WikiMedia Foundation as my mentor due to following reasons:

  1. I fell in love with the idea to make something useful for the world biggest online dictionary! It will be a great pleasure for me to work at that project.
  2. The experience, gained while taking part at the project, will be very important for my graduate work because MediaWiki is essential part of it.

This is my first proposal and I'm not willing to sign in to other projects because none of them compares to MediaWiki Performance optimization project.

Design

[edit]

First phrase

[edit]

This phrase focus only on the parsed content.

In this phrase, the text data will be cachable independently of the login and anonymous user. (The hide/show edit section doesn't affect the text data, since it is controlled by css) But the api.php need to send Last-Modified: header, and properly handle If-Modified-Since request. Unfortunately, the current api.php on wikipedia doesn't handle this.

--Ans 07:10, 8 May 2008 (UTC)[reply]

Prerequisite

[edit]
  • api.php need to send Last-Modified: header, and properly handle If-Modified-Since request. Without this this phrase will not improve any performance.

Problem

[edit]

Question

[edit]
  • Does user setting of hide/show edit section affect the content of text data?
    • Done: No, since the appearance of edit section is controlled by css.
  • Does user setting of "red link format", "justify paragraph", "auto-number heading", "show/hide TOC", affect the content of text data? --Ans 11:47, 8 May 2008 (UTC)[reply]
    • ...
  • How much this will improve the traffic on wikipedia? --Ans 12:14, 8 May 2008 (UTC)[reply]