Extension:Livelets

The idea of this extension is to allow live articles to be transcluded which update automatically on change in a non-polling, fully event-driven way. It will use the parser-functions syntax to make it very similar in usage to normal templates. It's called a livelet since it's very similar in concept to the re-usable areas of options and information in a web page often referred to as portlets, or applets if the content is of a more applicational style. The difference with livelets is that they are able to accept spontaneous incoming requests, not just to responses to their own requests, which means that livelets are able to stay up to date or be communicated with dynamically without any regular polling being necessary.

Livelets is still being developed and tested on the OrganicDesign wiki, see OrganicDesign:Extension:Livelets for more details. It involves a number of programming languages, but is installed in the usual way of unpacking the files into the MediaWiki extensions directory and including livelets.php from the LocalSettings.php file. It consists of four files:


 * livelets.php
 * livelets.pl
 * livelets.js
 * livelets.swf - compiled from livelets.as using the Flashlets extension

Current State & Usage
Currently the livelet only loads once using Ajax after the page content has loaded and is not dynamically kept up to date. It's used in a similar way to transcluding a template as follows:

Uses
The OrganicDesign site uses a livelet in the sidebar to load the main tree which can be very large for some users and would cause the site to be sluggish if it had to load the whole tree for each new page request. Having the large content in a livelet speeds up the site in two ways, firstly the large content only starts loading after the main page is loaded and accessible. And secondly, because the large content is a separate request with its own static URL, it can be cached locally by the browser.

Live Updates Using SWF
The default installation of Livelets uses Ajax technology which is used by many extensions and by the MediaWiki code itself and is considered safe. The problem with ajax however, is that changes cannot propagate automatically from the server to the clients, the clients must poll the server at a regular interval to see if any changes have taken place. Using SWF technology allows a fully asynchronous connection to be established between the server and the clients making the system fully event driven without any regular polling involved. However this method raises some security concerns as outlined by the XSS alert template above.