| United States-English |
|
|
|
![]() |
HP 9000 Networking: HP FTAM/9000 Programmer's Guide > Chapter 1 HP FTAM/9000 OverviewOverview of FTAM Concepts |
|
This section takes a high-level approach to explaining concepts you should know before writing FTAM applications. This section also refers to specific FTAM functions. For detailed information regarding these concepts and functions, refer to the Table of Contents for specific chapters and sections. A real filestore uses a variety of mechanisms to structure, store, and retrieve real files. For example, files on HP-UX systems are stored and accessed as a stream of bytes; on other systems files might be stored and accessed as fixed- or variable-length records, or in other ways. To conceal these storage and access differences, the FTAM specification defines a Virtual Filestore, or VFS. The VFS provides a uniform interface to all real file systems. It uses a system-independent model for describing files and their attributes. Though it represents real files, it masks the system- dependent differences in style and structure. (Refer to Figure 1-1 “HP-UX FTAM Virtual Filestore (VFS)”.) FTAM implementations map the VFS onto a real filestore. The mapping function (from the open system to the real system) absorbs the style and specification differences. You do not need to know the vendor, operating system, or file system with which you want to communicate. You need only know a file's complete name and where it is located. (However, you may need to read the other vendor's PIC statement.) Because the VFS is generalized, certain VFS concepts have no direct correspondence to the HP-UX file system. For example, a VFS file might have fixed-length records. Such records are not defined for the HP-UX file system. To provide HP-UX files with FTAM VFS attributes, HP-UX uses two files: an actual file and an optional shadow file.
The actual and shadow files taken together make an "FTAM file." The shadow file for an HP-UX file has the same name as the HP-UX file, prefixed by "._". For example, the FTAM file named myfile has a corresponding shadow file named ._myfile. Like all files that begin with a period, FTAM shadow files can be listed with the following command: $ ls -a Certain FTAM attributes—such as document type—exist only in the shadow file. Other FTAM attributes—such as file name—are mapped to normal HP-UX file attributes. Some FTAM attributes—such as access control— include a combination of HP-UX file attributes and shadow file information. The shadow file is not always necessary to read or delete a file. For these actions, FTAM uses default attributes. However, whenever FTAM creates or modifies a file, it always creates a corresponding shadow file.
Use caution when employing HP-UX utilities with FTAM-related files. The following examples illustrate the kinds of issues that can arise:
Shadow files that are inadvertently severed from their corresponding actual files remain as clutter. Furthermore, they could potentially interfere with future FTAM operations on files that have the same name as the original actual file. An FTAM transaction is built by calling FTAM functions in steps (or nested state sequences) called regimes. A regime is the period during which you can issue a specific set of FTAM functions. The regime determines the activities that can occur at a given time and therefore, creates the rules (protocols) for the FTAM state machine. Regimes are nested, in the following order. Applications must pass through outer regimes to gain access to the inner ones. They must also exit the regimes in proper order, leaving the inner regimes to gain access to the outer ones.
The following sections describe the basic means of FTAM communication: initiators, responders, application entities, synchronous calls, asynchronous calls, high and low level functions, and context free and context sensitive functions. As noted earlier, you write a program (user program) to access the FTAM interface using a library of functions. FTAM uses the initiator to make requests and the responder to service them. (Refer to Figure 1-3 “FTAM Communication Process”.)
An application entity (AE) is a uniquely identified component of your application that associates it with the OSI communications network. An AE may be an FTAM initiator or responder. Before locating, accessing, or manipulating FTAM files, you must establish communication (initialize an FTAM regime) with the AE (FTAM responder) that services the desired filestore. Identify the AE by specifying either the entity's presentation address (P_address) or its directory distinguished name (Ae_dir_name). These addresses are defined during system configuration and when nodes are added to the network. Consult your system administrator for the address information.
Once you establish the FTAM regime, you can access and manipulate FTAM files in that filestore. You can perform two types of file actions on the VFS: actions on complete files and file access actions. For example, you can create and delete a complete file or access a portion of a file's contents. FTAM functions use two modes of operation: synchronous and asynchronous:
An FTAM file has two distinct parts: its attributes and its contents. Attributes describe the file (e.g., size, creator), and are either file attributes or activity attributes: An FTAM document type corresponds to a file type on most systems. In real filestores, common file types include stream text files, record-oriented text files, binary files, and directories which contain files. These file types are represented by the following FTAM document types:
For more information on document types, refer to the "Document Types and Constraint Sets" chapter. For information on setting document types, refer to the "FTAM Data Structures" chapter. Document types restrict the type of file by specifying constraint sets. Constraint sets specify the allowable file structures and the ways in which access actions can modify the structure. Constraint sets are either Unstructured or Sequential Flat. (Refer to Figure 1-5 “FADU Defined by Unstructured Constraint Set” and Figure 1-6 “FADU Defined by Sequential Flat Constraint Set” for file structure information of these two types.) For more information on constraint sets, refer to the "Document Types and Constraint Sets" chapter. The FTAM file model consists of a hierarchical structure (ordered tree) containing various levels. A file access data unit (FADU) is the smallest unit you can access in an FTAM file. A FADU is the complete information content of a subtree (i.e., node descriptors and data units). FADUs may be nested and may contain several data units. The two file structures described by the Unstructured and Sequential Flat constraint sets are identified in the following illustrations. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||