PreviousNext

Backing Store Database Items and Headers

Note that although backing stores are necessary in implementing an ACL manager, their use is not limited to ACL management. Backing stores are designed to be used for all kinds of persistent storage of distributed data. For more information, see the OSF DCE Application Development Guide - Core Components.

As mentioned earlier, backing store databases are necessary for storing any information about the application's objects that must be preserved between application server sessions. The sample application uses three such databases, as described in Object Name Resolution Routine.

From the point of view of the application that uses it, a database is characterized in the following two ways:

· How it is indexed

· What kind of data item (record) can be stored in it

The former is specified by a flag passed to dce_db_open( ) when the database is first created; the latter is determined by the declarations you make in an .idl file.

An example of defining a backing store database item can be seen in the sample_db.idl and sample_db.acf files (note that the dce/database.idl file must be imported into the .idl file). A server stub and a header file is generated from these files when the application is compiled. The purpose of the .idl definitions is to establish the routine that will handle the transmission of the data items across the wire. Note that we don't implement the conversion routine; we just declare it in the .idl file: IDL itself does the rest, generating the necessary code in the client stub.

As has already been mentioned, the sample application uses three databases. The most complex of these is the object-indexed store (its handle is db_object). The other two, name-indexed (db_name) and ACL UUID-indexed (db_acl), are much simpler. Each of the three is briefly described in the following topics.