Service Packaging and Import

    Note: this is about to be rewritten as a library that will be exposed as command line tool first rather than a service that the tool talks to. It will talk to MindTouch over the Import/Export protocol.

    Overview

    The service import tool allows service developers to deliver a service and its assets in a simple package, including instructions gathering configuration data from the installer. The service package is a zip file consisting of the a modified import manifest and the assets referred to in the manifest. The package can include the following:

    • service
      • configuration
      • preferences
    • templates
    • samples
    • assets (images, css, etc.)

    Manifest markup for requirement gathering

    The package import tool will process the manifest and use embedded prompt elements to determine what additional information is required to transform the manifest into one valid for import. Prompt elements are used to mark up existing elements to modify their values and attributes.

    <document xmlns:p="http://mindtouch.com/ns/prompt">
        <p:prompt p:required="true)"
                  p:name="MyElement" 
                  p:description="Just some element"
                  p:default="some value"/>
        <p:prompt p:required="false"
                  p:name="MyAttribute"
                  p:description="An optional attribute"
                  p:default="baz"
                  p:target="@attr"/>
        <element attr="foo">
            element value
        </alert>
    </document>

    The above document would generate prompts for both the document/element value and document/element/@attr similar to this:

    MyElement (Just some element): some value

    MyAttribute (An optional attribute, optional): baz

    If the defaults are accepted as is, the processing would result in this document:

    <document>
        <element attr="baz>some value</element>
    </document>

    Prompt elements always preceed the element they affect and have the following attributes:

    • name - informational name for describing the data to be gathered (required)
    • description - extended description of the data to be gathered (optional)
    • required - whether the information is required (default: true)
    • default - the default value, also the value to be used in lieu of data being provided
    • target - by default the larget it the element value. To target an attribute, target is set to the attribute name(optional)

     


    Commandline Tool

    mindtouch.deki.serviceutil.exe
        /import
        /uri http://foo.com/@api/deki/site/services/import
        /apikey 123456
        package.zip
    

    The commandline tool can be used in interactive or scripted form. It uses the service features to upload the package and interacts with the configuration request. If provided a configuration file, the configuration request is automatically filled out, returning an error specifying missing data if insufficient. Alternatively, without a configuration file, the tool runs in interactive mode, prompting the user for the required information.

    Unsolved Problems

    • Internal Extension
      • What if the dll isn't already on disk?
      • What if a service with the sid/namespace is already configured?
    • What about extension storage? (more of an issue for export, i.e. out of scope for import?)

     

    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by