[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

5177.0. "What is the data structure of the MIR?" by SOAEDS::PRUSS () Thu Jun 10 1993 12:13

    What is the data structure of the MIR?
    
    I am teaching DECmcc/Ultrix (polycenter 200) and have a few questions:
    
    Presently we can export to SQL on Ultrix or Rdb on VMS. What is the
    data structure for the MIR: Are there any utlities to extract this
    info outside the two mentioned above? The purpose is to extract data
    to be used in a third party database. I have a Network Mgr for the
    U.C. Berkley EECS dept who would like to get these questions answered.
    
    
    Thanks,
    Doug Pruss
    MVCS Training
T.RTitleUserPersonal
Name
DateLines
5177.1TOOK::MCPHERSONDead or Canadian?Thu Jun 10 1993 13:2819
>    Presently we can export to SQL on Ultrix or Rdb on VMS. What is the
>    data structure for the MIR: Are there any utlities to extract this
>    info outside the two mentioned above? The purpose is to extract data
>    to be used in a third party database. I have a Network Mgr for the
>    U.C. Berkley EECS dept who would like to get these questions answered.

The data structure of the MIR is (essebtially) proprietary.  I.e. we
don't/won't tell you how to monkey with the data directly.

The *interfaces* to the MIR are the mcc_mir() routines.  These are NOT
proprietary.  The mcc_mir routines are fully documented and supported as a
mechanism for getting data in & out of the MIR.  

So: it appears your two available mechanisms are to either 
	1. export the data using the exporter FM (as your mentioned) or
	2. write the appropriate 'bridging' application between MCC and the 3rd
	   party database using the mcc_mir routines.

/doug
5177.2Proprietary != SecretTOOK::STRUTTManagement - the one word oxymoronFri Jun 11 1993 12:2615
    Perhaps the structure of the MIR is *proprietary*, and we would want it
    to be such that we reserve the right to make changes to the underlying
    disk formats for various reasons, though the API would always continue
    to work.
    
    However, with that caveat in mind, there's no reason for the
    information to be *secret* is there? Surely, if others wish to write
    tools against the MIR, that is only to our advantage.  Just so long as
    the caveat is understood.
    
    So why don't we make the design specs available - at least to the
    people teaching the courses, so that those who are really interested
    (let's call them our friends) can get at the relevant information?
    
    Colin
5177.357001::dougDead or Canadian?Fri Jun 11 1993 13:2319
I would assume we would want people to use the mcc_mir() routines instead
of direct calls to ndbm, RMS and whetever Olivetti uses in the interest of 

        1) portability - the mcc_mir() routine-bases applications should be 
                         able to use data from MCC on ULTRIX,VMS or UNIX
                         SVR4.

        2) supportability - Do we *really* want to get in the business of
                            trying to support and fix all the various
                            flavors of *nasty* things that you can do to
                            the database if you circumvent the API?

Given those two concerns, I think time would be better spent developing and
distributing example source code for applications (I.e. 'callable mcc'
applications) that actually do useful
things with the mcc_mir() routines.  E.g. get or set reference attributes,
export existing registration database into other management system database
formats; import registration information *from* other database formats into
MIR records, etc etc.
5177.4In the interest of simplicityMOLAR::ROBERTSKeith Roberts - Network Management ApplicationsFri Jun 11 1993 14:56122
You should check out the MIR routines provided with the Example FM.
They layer ontop of the MCC_MIR calls and eliminate a lot of details
needed to manipulate data in the MIR:

>>> mcc_example_fm_library.c

/************************************************************************
 *                                                                      *
 *                      Routines in this Module:                        *
 *                                                                      *
 ************************************************************************
 *                                                                      *
 *                <<< Specific to the Example FM >>>                    *
 *                                                                      *
 *  exlib_create_example_mir      - Creates the Example FM MIRs         *
 *  exlib_build_example_entity    - Builds the Example Entity Specifier *
 *                                                                      *
 *                <<< (mostly) Generic Routines >>>                     *
 *                                                                      *
 *  exlib_init_call_arguments     - Initialize the DECmcc Call Args     *
 *  exlib_free_call_arguments     - Frees the DECmcc Call Arguments     *
 *                                                                      *
 *  exlib_mir_open                - Opens a connection to a MIR         *
 *  exlib_mir_create_instance     - Creates a MIR Instance              *
 *  exlib_mir_select_instance     - Selects an existing MIR Instance    *
 *  exlib_mir_put_attribute       - Puts an attribute in the MIR        *
 *  exlib_mir_get_attribute       - Gets an attribute from the MIR      *
 *  exlib_mir_set_attributes      - Process In-P & Update MIR Attrs     *
 *  exlib_mir_close               - Close the connection to the MIR     *
 *  exlib_mir_cancel              - Cancel the connection to the MIR    *
 *  exlib_mir_set_time_stamp   +  - Set Time Stamp for Write Attr data  *
 *  exlib_mir_set_time_range   +  - Set Time Range for Read Attr data   *
 *  exlib_mir_get_time_stamp   +  - Get the Attr record Time Stamp      *
 *  exlib_mir_next_time        +  - Get next Attr record for Time Range *
 *  exlib_mir_next_instance    +  - Get next Wildcarded Instance        *
 *                                                                      *
 *  exlib_timed_operation         - Times-out user specified routine    *
 *  exlib_cvt_phase4addr_to_str   - Converts Phase4Address to string    *
 *  exlib_build_event_filter      - Converts In-P to an Event Filter    *
 *                                                                      *
 *                             + not yet implemented                    *
 *                                                                      *
 ************************************************************************/

/************************************************************************
 *                                                                      *
 *                    About the 'exlib' MIR routines                    *  
 *                                                                      *
 ************************************************************************
 *                                                                      *
 *  The Example FM Library contains useful routines which help to       *
 *  manipulate a Management Module private MIR database.  These         *
 *  routines are based on transactions.  To access your MIR, you...     *
 *                                                                      *
 *   o  Open a connection to your MIR                                   *
 *                                                                      *
 *   o  Select an existing Entity Instance                              *
 *        << or >>                                                      *
 *      Create a new Entity Instance                                    *
 *                                                                      *
 *   o  Put or Get individual Attributes                                *
 *        << or >>                                                      *
 *      Set Attributes (modify)                                         *
 *                                                                      *
 *   o  Close the connection and commit the operation                   *
 *        << or >>                                                      *
 *      Cancel the connection and discard the operation                 *
 *                                                                      *
 *                                                                      *
 *  These routines perform all the ILV encoding and decoding of         *
 *  *simple* DECmcc datatypes - providing the developer with a          *
 *  simpler interface to the DECmcc MIR routines.                       *
 *                                                                      *
 *   o  exlib_mir_open                                                  *
 *       - Accepts simple CHAR arrays instead of Descriptors            *
 *          + for the MIR names; Instance and Attribute                 *
 *          + for the MIR directory                                     *
 *          + for the MIR lock                                          *
 *       - Creates the MIR Context Block                                *
 *       - Creates the MIR file if it doesn't already exist.            *
 *       - Creates a Lock on your behalf                                *
 *                                                                      *
 *   o  exlib_mir_select_instance                                       *
 *       - Acquires a 'concurrent' lock on your behalf                  *
 *       - Tests if an Entity Instance already exists                   *
 *       - Sets up for Getting and Putting Attributes                   *
 *                                                                      *
 *   o  exlib_mir_create_instance                                       *
 *       - Acquires an 'exclusive' lock on your behalf                  *
 *       - Creates an Entity Instance int the MIR                       *
 *                                                                      *
 *   o  exlib_mir_put_attribute                                         *
 *       - Puts an Attribute into the MIR (for the selected Instance)   *
 *                                                                      *
 *   o  exlib_mir_get_attribute                                         *
 *       - Gets an Attribute from the MIR (for the selected Instance)   *
 *                                                                      *
 *   o  exlib_mir_set_attributes                                        *
 *       - Acquires an 'exclusive' lock on your behalf                  *
 *       - Modifies the Attributes specified by the DECmcc Call         *
 *         Argument In-P                                                *
 *       - Optionally builds Out-P; contains the attributes modified    *
 *       - Used to provide the 'Set' directive functionality on a MIR   *
 *                                                                      *
 *   o  exlib_mir_close                                                 *
 *       - Commits your operations to the MIR                           *
 *       - Releases locks                                               *
 *       - Deletes the MIR Context Block                                *
 *                                                                      *
 *   o  exlib_mir_cancel                                                *
 *       - Discards your operations to the MIR (roll back)              *
 *       - Deletes any created MIR Instances during the transaction     *
 *       - Releases locks                                               *
 *       - Deletes the MIR Context Block                                *
 *                                                                      *
 *  NOTE: The remaining MIR routines are only stubbed in -- these       *
 *        routines manipulate historical MIR data.                      *
 *                                                                      *
 *  NOTE: The exlib_mir_select_instance does not currently support      *
 *        multi-level Instance wildcarding.                             *
 *                                                                      *
 ************************************************************************/