[Pipet Devel] Idl2

jarl van katwijk jarl at casema.net
Sun Mar 26 09:43:56 EST 2000


Hi,

Checked the syntax and compiled the idl :)

bye,
jarl
-------------- next part --------------
// DDL2DBL.idl
//
// IDL for dealing with communication between the GUI (buffered by a small
// middle) and the data processing engine.
//
// Changelog:
//		23 Mar 2000		: Brad, creation 
//		25 Mar 2000		: Jarl, added gms naming
//      26 Mar 2000     : Renamed again :) added\remove some functions
//                        Actually compiled this :)

/**
 * Organization of modules.
 * vsh: The overall module (the name can change when we decide on a formal
 *      name).
 * gui2dp: idl for communication between the GUI (interpeter?) and the 
 *      data processing engine.
 * ADM: Automatic Definition Maker, a GUI or script that defines structures.
 * DFB: DataFlow Broker, layer that does the distribution\authentication\etc
 * DFP: DataFlow Procesor, layer that does the 'real' dataflow work.
 * 
 */

module VSH {
  /**
   * Functions exported by the DataFlow Broker
   */
  module DBL {
    // ##### exceptions
    // ----------------

    // Requested Id is already being used for another gui.
    exception DDLIdInUse {};
    // Id number used for requested operation was not found in the list of
    // current gui ids being served by the data processor.
    exception DDLIdNotFound{};
    // The information for a node is not yet available because the process
    // has not completed.
    exception DDLInfoNotAvailable{};
                            
    // The DBL\DFP couldn't accept the XML document and so didn't allocate an uri.
    exception URIUndefined{};
    // The uri is already defined.
    exception URIInUse{};
    // The uri cant be found, it does not excist or is not accessable.
    exception URINotFound{};

    // Requested information was not found.
    exception INFONotAvailable{};

    // ##### structs, enums and typedefs
    // ---------------------------------

    // A sequence/list of strings. Useful for returning info like a list of
    // program ids for available programs.
    typedef sequence <string> stringlistT;
    // DDL identification number, or 'account name'.
    typedef long ddlidT;
    // Passwords
    typedef string passwordT;

    // Connection type:
    //   -1 = Unconnected
    //    0 = Unknown
    //    1 = Plain connection
    //    2 = Encrypted connection, based on {TODO:type} encryption
    enum connectionE {
        UNKNOWN,
        UNCONNECTED,
        PLAIN,
        ENCRYPTED1
    };

    // Status type:
    //   -1 = Error (TODO: Other negative values to define various errors)
    //    0 = Unknown
    //    1 = Passing
    //    2 = Blocking
    //    4 = Temporary
    //    8 = Isolated
    typedef long statusT;
    
    // URI type, a 128bits locating id:
    // bits 0-31 : instance id
    // bits 32-63 : brokering id, or subnet id
    // bits 64-127 : node id
    struct uriT {
        long instanceID;
        long subnetID;
        long nodeID;
    };
                            
    // ##### interfaces                 
    // ----------------
                            
    // Functions for dealing with a front to middle connection.
    // TODO: define 'front' and 'middle' ??

    //interface Connection {
	interface CONNECTION {
    // TODO: maybe introduce a 'access level', so ADM's can be limited?
        /** setup
         * Initialize a connection from the gui to the data processing engine.
         * @parm    ddl_id - An unique id to represent the gui connection
         * @parm    password - The password associated with this id.
         * @parm    connecttype - requested connection type.
         * =returns A boolean indicating the success of the initialization
         * +raises  IdInUse - The passed gui_id is already in use by another gui.
         */
        boolean setup(in ddlidT ddlid, in passwordT password, in connectionE connecttype)
            raises (DDLIdInUse);
        /** release
         * Close the connection between the gui and data processing engine.
         * Used when closing down a GUI.
         * @parm    ddl_id - An unique id to represent the gui connection
         * @parm    password - The password associated with this id.
         * =returns A boolean indicating the success of the initialization
         * +raises  IdNotFound - The passed id was not found in the list of
         *          ids registerd with the data processing engine.
         */
        boolean release(in ddlidT ddlid, in passwordT password)
            raises (DDLIdNotFound);
        /** check
         * Checks if the DDL with id 'ddl_id' has been connected
         * @parm    ddl_id - An unique id to represent the gui connection
         * =returns type of connection
         * +raises  DDLInfoNotAvailable - this connection isn't setup correctly
         */
        connectionE check(in ddlidT ddlid)
            raises (DDLInfoNotAvailable);
    };

    /**
     * Functions for passing XML information to the data processing engine.
     */
    interface REPRESENTATION {
    // Functions dealing with XML document syncronisation.

        /** upload
         * Uploads a XML document to the DBL, which will pass most of it to the DPL.
         * @parm    xml_to_process: A big string of xml describing the nodes/loci
         *          to be processed and the relationship between them.
         * @parm    ddl_id - The ID of the DDL that uploads the document
         * @parm    password - The password associated with this id.
         * =returns the URI the uploaded structure got assigned by the DBL.
         * +raises  URIUndefined, the DBL\DFP couldn't accept the XML document. Use 
         *          DATAFLOW::check to see what is wrong
         */
        uriT upload(in string xmldocument, in ddlidT ddlid, in passwordT password)
            raises (URIUndefined);

        /** update
         * Updates an excisting structure.
         * @parm    xml_document - The XML document
         * @parm    uri - the uri id of the structure to be overwritten
         * @parm    ddl_id - The ID of the DDL that uploads the document
         * @parm    password - The password associated with this id.
         * =returns boolean success status.
         * +raises  URIInUse, the uri is currently running or the DDL is not authorized 
         *          to overwrite it.
         */
        boolean update(in string xmldocument, in uriT uri, in ddlidT ddlid, in passwordT password)
            raises (URIInUse);

        /** download
         * Downloads a XML document from the DBL to the DDL.
         * @parm    uri - uri of the structure to be downloaded.
         * @parm    ddl_id - The ID of the DDL that uploads the document
         * @parm    password - The password associated with this id.
         * =returns XML document.
         * +raises  URINotFound when uri doesn't excist or is not reachable.
         */
        string download(in uriT uri, in ddlidT ddlid, in passwordT password)
            raises (URINotFound);

        /** status
         * Used for checking the status of an URI 
         * @parm    uri - uri of the to be checked structure
         * @parm    ddl_id - The ID of the DDL that uploads the document
         * @parm    password - The password associated with this id.
         * =returns status of the structure uri
         * +raises  URINotFound when uri doesn't excist or is not reachable.
         */
        statusT check(in uriT uri, in ddlidT ddlid, in passwordT password)
            raises (URINotFound);
     };

    /**
     * Functions dealing with a process that has been sent to the middle.
     */
    interface STATUS {
    // Functions that give status information of the core (DBL and DPL)
    // Functions for getting information about programs and libraries registered
    // with the processing engine.
    // TODO: Jarl should put more work in checking these :)

        /** 
         * Request information the status of the overall process.
         * @parm process_id - the unique id associated with a process.
         * @returns A double representing the progress towards completion.
         *          1 indicates completion, 0 indicates the process has not
         *          started, numbers between 0 and 1 represent the percent
         *          completion, and -1 indicates an error in the process
         * @raises IdNotFound - If the passed process_id is not found.
         */
       //TODO: this function is replace by REPRESENTATION::check ????  double query_process(in string process_id) raises (IdNotFound);
        
        /**
         * Request information about a particular node/locus in a process.
         * @parm process_id - the unique id associated with a process.
         * @parm node_id - the unique id associated with a node.
         * @returns A double representing the progress towards completion.
         *          1 indicates completion, 0 indicates the process has not
         *          started, numbers between 0 and 1 represent the percent
         *          completion, and -1 indicates an error in the process.
         * @raises IdNotFound - if either the process or node id were not
         *         found.
         */
        //TODO: see above?? double query_process_node(in string process_id, in string node_id)
        //    raises (IdNotFound);
                
        /**
         * Get the information for a node so that is can be displayed in the
         * GUI.
         * @parm process_id - the unique id associated with a process.
         * @parm node_id - the unique id associated with a node.
         * @returns A string with the info from the node.
         *          TODO: Need a structured and generalized way to return info
         *          and pass it to a visual so it can be seen in the GUI
         *          Strings aren't going to cut it for everything, 
         *          I don't think.
         * @raises InfoNotAvailable - If the node currently doesn't have any
         *         information to send (ie. process is not complete.
         */
        string getnodeinfo(in passwordT processid, in uriT uri)
            raises (INFONotAvailable);  
        
        /**
         * Get a list of all the program ids of programs registered functional
         * (ie. loaded) with the processing engine.
         * @returns A sequence of strings (list) with the node_ids of availeble
         *          nodes.  
         */
        stringlistT getprogramids();
        
        /**
         * Query a specific node to see if it is available.
         * @parm node_id - the unique id of a node (program/function).
         * @returns 1 if the program is loaded, 0 if it is not.
         */ 
        boolean isavailable(in uriT uri);
        
    };
    
  };
};


More information about the Pipet-Devel mailing list