With the anticipated arrival of DekiScript special pages and features like user dashboard and content curation reporting, many of our future mashup capabilities will reside with DekiScript pages (as opposed to PHP plugins). This arrival will require a story around updating the templates that are shipped inside MindTouch between updates. This work has not been possible until the import/export story was completed as well.
This feature will be geared for administrators of a site who are responsible for keeping MindTouch up-to-date.
This serves as the first utilization of the import/export story outside of the Desktop Connector and will be the foundation for a more robust template discovery/install story.
With the large number of functional templates that will be shipped with MindTouch, it becomes imperative that we do our best to keep "default" templates out-of-the-way so site-specific templates can easily be discovered from the template dialog. If it becomes possible, we should try to ship all MindTouch-backed templates into Template:MindTouch/* with the default permissions set to Semi-Public.
(Are there any implications to this?)
Initial scoping by RoyK. To be a part of the Olympic release.
This specification will change over time, as our delivery mechanisms may evolve towards something more advanced and automatic. In this first iteration, it will be necessary to have a consistent story that works reliably in updating.
The systems administrator will install/upgrade MindTouch in the same method that they've used in the past. Upon successful update, a flag is set within the system that allows the API/UI to know that while the server code has been updated, the MindTouch functional templates have not been updated yet. (Unrelated thought: If we set a site-wide flag, would it be possible to set user-level flags that would pop-them up with a message about "Here's what's new in MindTouch 2010?")
Administrators will get a warning message indicating they must update their MindTouch functional templates or not everything will function correctly. The message will link to a control panel page, where the user can update their MindTouch functional templates. (Any views that utilize MindTouch templates should stamp with a version.)
From the control panel view, the administrator will see a list of all the functional templates that will be updated and if they will be adding, removing, or replacing existing functional templates. Upon clicking "Update my templates", the local .war file (which will be pushed as a part of the package) will then be pushed to the import feature in the API. (The operation will be a replace all or none feature).
Once the import is successfully completed, the warning messages will disappear.
To create a new packaged solution, it'd be possible to create a new .mtarc file which would supplement the default .mtarc file; these would be loaded in sequence to allow for overwriting of default templates.
Another approach to the update of these MindTouch templates would be to try to automate the update upon service startup. A checksum/date of the last known updated .war file could be stored in the site properties, and this information could be used to trigger an automatic import of files. The downsides to this approach are that changes would be blown out without warning, and systems being restarted in distress would fall under additional stress in the case that many files must be updated.
This approach would not lend itself to extending this functionality for users to discover other functional templates in the MindTouch ecosystem and installing them through a simple CP interface.
The administrator can also go to the MindTouch control panel and refresh the whole template list.
Not all of these need to be solved in the first iteration
Assumption: Page was packaged with an exporter suportting this capability
Import Workflow:
Mismatched importer tool/feature:
When forcing a tickle to re-import the packaged files, the UI will clear out the property from site settings and then tickle the service.
This feature will trigger the updater service to scan for packages in its template folder and import new packages into the instance.
Request Document:
<update wikiid="{wikiid}">
<uri>{apiuri}</uri>
</update>
A list of installed packages can be obtained by finding all site properties of the form mindtouch.packageupdater.imported#{packagename}, where {packagename} refers to the package on disk. To force a package to re-import, delete the appropriate site property.
The import will be performed as the user specified in the config key 'packageupdater/username' or fallback to 'admin' or 'sysop' if no configuration value is found.
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by
@royk - Neilw pointed about template updates on his TemplateDoc proposal: http://developer.mindtouch.com/User:neilw/Template_Self-Documentation_Project/TemplateDoc%3a_automatically_generate_basic_template_documentation
* permissioning of pages (how is it going to work?) (maybe the feature endpoint does additional logic around permissioning)
* custom config key for going through .arc files
* per instance start-up
* pre-flight page-level checks (UI prompt)