bgcolor="#FFFFFF" text="#000000" link="#0000CC" vlink="#AA0066"
ANSI/NISO Z39.50-1992                          ISSN: 1041-5653
(Revision of ANSI/NISO Z39.50-1988)

Application Service Definition and Protocol Specification for Open Systems Interconnection


3. Information Retrieval Service

This section defines the Information Retrieval service, which is supported by the Information Retrieval protocol.

3.1 General Characteristics of the Information Retrieval Service

The service definition describes an activity between two applications on different computers: an initiating application, the origin, and a responding application, the target. The target is associated with one or more databases. Communication between origin and target is via an application association. An association is explicitly established by the origin and may be explicitly terminated by either origin or target, or implicitly terminated by a communication failure or other external event.

The roles of origin and target may not be reversed within an association. An association cannot be restarted, thus no status information is retained once an association is released.

The complete application service is composed of the association control service element, which provides association management, and one or more specific application services, such as the Information Retrieval application service. There are three distinct phases during the life of an application association: establishment, information transfer, and termination. The association control service element provides all of the services required during the establishment and termination phases, including the selection of an application context specifying, among other things, the set of service elements which are valid during the information transfer phase. Section 4.2.1.2 specifies those services for association control that are assumed by the Information Retrieval service.

3.2 Facilities of the Information Retrieval Service

There are seven facilities defined by this standard. Each of the Initialization, Search, Retrieval, Result-set-delete, and Access Control facilities consists of a single service. The Accounting/ Resource Control facility consists of three services. The Termination facility consist of two services.

  1. Initialization Facility Init Service: Init request by the origin followed by an Init response from the target. The Init service is a confirmed service initiated by the origin.

  2. Search Facility Search Service: Search request by the origin followed by a Search response from the target. The Search service is a confirmed service initiated by the origin.

  3. Retrieval Facility Present Service: Present request by origin followed by a Present response from the target. The Present service is a confirmed service initiated by the origin.

  4. Result-set-delete Facility Delete Service: Delete request by the origin followed by a Delete response from the target. The Delete service is a confirmed service initiated by the origin.

  5. Access Control Facility Access-control service: Access-control request by the target, following an Init, Search, Present, Delete, or Resource-report request by the origin and followed by an Access-control response from the origin. The Access-Control service is a confirmed service initiated by the target.

  6. Accounting/Resource Control Facility The Accounting/ Resource Control facility consists of three services: the Resource-control service, the Trigger-resource-control service, and the Resource-report service.

  7. Termination Facility The Termination Facility allows an origin or target system to initiate abrupt termination of the association, or an origin system to initiate graceful termination.

    The IR-abort and IR-release services map directly onto the A-ABORT and A-RELEASE services (respectively) of the association control service element.

3.2.1 Initialization Facility

3.2.1.1 Init Service

The Init service allows an origin to propose values for initialization parameters. The target system may propose alternative values for some of the parameters. If so, the origin must either accept the alternative values proposed by the target or else terminate communication. See Table 1.

                   Table 1: Parameters of the Init Service

                                   Origin          Target
        Parameter                  Request         Response
   
   Id/authentication               x  (optional)
   ______________________________________________________________________
   Options                         x               x
   ______________________________________________________________________
   Preferred-message size          x               x
   ______________________________________________________________________
   Maximum-record-size             x               x
   ______________________________________________________________________
   Result                                          x
   ______________________________________________________________________
   User-information-field          x (optional)    x (optional)
   ______________________________________________________________________
   Reference-id                    x (optional)    x (if appl.)

3.2.1.1.1 Id/authenmtication

The origin and target agree, outside the scope of the standard, whether or not this parameter is to be supplied by the origin, and if so, what the value is. This value is used by the target to determine if the origin is authorized to enter into communication with the target.

3.2.1.1.2 Options

The Init request specifies either "will use" or "will not use," and the Init response specifies "will support" or "will not support" for the following capabilities:

  1. search

  2. present

  3. delete

  4. resource-report

  5. trigger-resource-control

If the target specifies "will support" for a particular capability, then the origin may assume that the service will be available and may use the service during the association, even if the origin had specified "will not use" for that service.

In addition, the Init request specifies either "will support" or "will not support," and the Init response specifies "will use" or "will not use" for each of the following capabilities:

  1. resource-control

  2. access-control

If the request specifies "will not support" for a given capability, and the response specifies "will use" for that capability, then the value of Result must be "reject."

Note: the above two lists of capabilities are subject to expansion in future versions of this protocol.

Security is invoked at different levels. In addition to user authentication at the outset of an association, security might be invoked to control access to a particular database, record, result-set, or use of a command. It might be used to determine whether an origin is authorized to request a resource report.

If the origin is not capable of receiving an Access-control request, and if security requirements on the target system mandate that security (other than that which might be provided by the parameter Id/authentication) be invoked at the outset of an association, then the target should reject the association by setting the parameter Result to "reject," and specifying "will use" for "access-control." However, if the target invokes security, but not at the association level, then the target may choose to accept the connection. In that case, if the target subsequently receives a command that would precipitate an Access-control request, the target agrees to suppress the request and respond to the command with an error status indicating that a security challenge was required but could not be issued.

3.2.1.1.3 Preferred-message-size and Maximum-record-size

The Init request contains Preferred-message-size and Maximum-record-size, specified in bytes. Maximum-record-size must be greater than or equal to preferred-message-size. The Init response contains both the Preferred-message-size and Maximum-Record-size that the target is going to use.

The target has the option of responding with values different from those requested by the origin (however, Preferred-message-size must be less than or equal to Maximum-record-size), in which case, the origin may abort the connection if those values are not acceptable. The usage of these parameters is specified in section 3.3.

3.2.1.1.4 Result

The target indicates whether or not it accepts the association by specifying a value of "accept" or "reject" respectively in the parameter Result. If "reject" is indicated, the origin is expected to terminate communication.

3.2.1.1.5 User-information-field

This field may be used by either the origin or target for additional information not specified by this standard.

3.2.1.1.6 Reference-id

See section 3.4.

3.2.2 Search Facility

The Search facility enables an origin system to query databases at a target system, and to receive information about the results of the query.

3.2.2.1 Search Service

The Search service allows an origin to send a query to a target. The basic query concept is: "from the specified set of items, identify those with the properties indicated." The set of items identified is called the "result set," and is maintained by the target for subsequent retrieval requests. However, depending on the parameters of the search, one or more items identified by the result set may be immediately returned as part of the search response. The result set is an ordered set; items identified by entries in the result set are referenced by the position of the entry within the result set, beginning with one (1). See Table 2.

                   Table 2: Parameters of the Search Service

                                   Origin          Target
        Parameter                  Request         Response

   Query-type                      x
   ______________________________________________________________________
   Query                           x
   ______________________________________________________________________
   Database-names                  x
   ______________________________________________________________________
   Request-set-name                x
   ______________________________________________________________________
   Replace indicator               x
   ______________________________________________________________________
   Small-set-element-names         x (opt.)
   ______________________________________________________________________
   Medium-set-element-set-names    x (opt.)
   ______________________________________________________________________
   Preferred-record-syntax         x (opt.)
   ______________________________________________________________________
   Small-set-upper-bound           x
   ______________________________________________________________________
   Large-set-lower-bound           x
   ______________________________________________________________________
   Medium-set-present-number       x
   ______________________________________________________________________
   Database/diagnostic-records                     x (if appl.)
   ______________________________________________________________________
   Result-count                                    x
   ______________________________________________________________________
   Number-of-records-returned                      x
   ______________________________________________________________________
   Next-result-set-position                        x
   ______________________________________________________________________
   Search-status                                   x
   ______________________________________________________________________
   Result-set-status                               x (if appl.)
   ______________________________________________________________________
   Present-status                                  x (if appl.)
   ______________________________________________________________________
   Reference-id                    x (opt.)        x (if appl.)

3.2.2.1.1 Query-type and Query

The parameter Query-type identifies the syntax of the query. As noted above, the basic query concept is "from the specified set of items, identify those with the properties indicated." The "specified set of items" is a collection of one or more databases, specified by the parameter database-names. The "properties indicated" are specified by the parameter Query.

Five types are defined:

3.2.2.1.1.1 RPN Query

This section specifies procedures when Query-type is 1, `RPN-query.' The RPN query has the following structure:

   RPN-query     ::=  argument | 
                      argument+ argument + operator
    argument     ::=  operand | RPN-query
     operand     ::=  attribute-set + term |
                      Result-set-id
    operator     ::=  AND | OR | AND-NOT

Where

   "::="  means "is defined as,"
   "|"    means "or," 
   "+"    means "followed by," and + has precedence over |  
          (i.e., + is evaluated before |).

Notes:

(1) "RPN-query" is recursively defined; it is either

In case (b), each occurrence of "argument" can be replaced by either (a) or (b) and so on. A structure composed of operators and operands conforms to the Type-1 query syntax if and only if it is possible, by repeatedly replacing occurrences of (b) with (a), to reduce the structure to (a).

(2) "Operand" is either (a) attribute-set + term, or (b) Result-set-id. In either case it represents a set of database records. For (a) it is the set of database records obtained by evaluating the specified attribute-set and term against the collection of databases specified in the Search request (see Note 3). For (b) it is the set of database records represented by the result set for which Result-set-id was specified as the value of the parameter Result-set-name in a previous Search request.

(3) Different attribute sets will be defined and registered (Appendix C defines and registers attribute-set bib-1). An example of an attribute-set/term combination is `title word'/ `evangeline'; in this case, evaluation of attribute-set/term against a database would result in the identification of all of the records in the database for which the access point `title word' contains the value `evangeline'.

Representation and Evaluation of the Type-1 Query:

At the origin system, the Type-1 query is represented by a tree. Each leaf node contains a simple operand and each non-leaf node contains a complex operand. A simple operand is either a Result-set-id or an Attribute-set+Term. A complex operand is a subtree whose root is an operator and which contains two subtrees: a left-hand operand and a right-hand operand, LO and RO. A complex operand is thus one of the following:

At the target, evaluation of the tree is illustrated by the use of a stack. The tree is processed according to a left post-order traversal. Each leaf-node is one of the following:

Whenever (a) is encountered, it is evaluated against the collection of databases specified in the Search request, and the result is put on the stack. Whenever (b) is encountered, it is put on the stack. Whenever (c) is encountered, the last two items (i.e. sets, see Note 2 above) that have been put on the stack are pulled off and the operator is applied as follows:

The resulting set is then put on the stack.

When evaluation of the query is complete (i.e. all query-terms have been processed) there will be one item remaining on the stack (otherwise the query is in error) which is the result of the query.

The following examples illustrate query evaluation. In these examples, D represents the collection of databases specified in the Search request, R represents a Result-set-id, and A, B, and C represent attribute-list/term combinations such as "subject = dogs."

3.2.2.1.2 Database-names

The target designates, by agreement outside the scope of the standard, what databases may be specified on a Search request, and also in what combinations they may be specified. For example, a target might specify that databases A, B, and C, may be searched individually, and that A and B may be searched in combination (but not A and C, nor B and C). If an origin requests a combination of databases which is not supported, the search will result in a diagnostic such as "combination of specified databases not supported" (see Appendix D).

3.2.2.1.3 Result-set-name and Replace-indicator

The parameter Result-set-name specifies a name to be given to the result set which will be created by the query so that it may be subsequently referenced within the same association.

A target system need not support, in general, the naming of result set by the origin (see however section 4.4.3, Statement Requirements). However, a target system must support at least the result set whose name is "default." If the origin specifies "default" as Result-set-name, then Replace-indicator must be "on."

A result set that is created by a Search request (that is, specified by the parameter Result-set-name) may be referenced in a subsequent Present request or as an operand in a subsequent Search request (for example, in a Type-1 query). If a result set named "default" is created, it remains available for reference from the time it is created until the end of the association during which it is created, or until either:

Any result set other than the result set named "default" remains available for reference from the time it is created until it is deleted in one of the following ways:

3.2.2.1.4 Small-set-element-set-names and Medium-set-element-set-names

An element set name is a primitive name that specifies a particular subset of the elements in a database record that are to compose the response records. The specified subset is made up of components of the abstract-syntax description of the database records and is, therefore, a formal subset of that abstract-syntax-definition. Element set names are specified, along with their definitions, for a given database, by the target, outside of this standard. The target specifies a default element set for each database.

The parameters Small-set-element-set-names and Medium-set-element-set-names describe the preferred composition of the records expected in the search response. If the query results in a small-set (see 3.2.2.1.6), then Small-set-element-set-names pertains. If the query results in a medium-set, then Medium-set-element-set-names pertains.

Each of the two parameters is a set of one or more pairs of a database name and associated element set name. For each database record returned in a Search (or Present) response, if the given database is specified (as a component of one of the pairs comprising the pertaining element set name) then the response record should be composed according to the corresponding element set name. If not, the response record should be composed according to the default element set name for that database. If an element set name is specified which is not valid for the corresponding database, then the Search Response will include a diagnostic, such as "element set name not valid for database," and the value of the parameter Search-Status will be "failure."

Each of the two parameters may alternatively consist of a single element set name (from those defined by the target system), with no database specified. In that case, for each database record returned in a Search (or Present) response:

A target system must always recognize the character string "F" as an element set name to mean "full record." When a "full record" is requested, the target returns all of the elements stored in its database for the requested record. For a given record, the set of elements included in a "full record" in one database might not be the same set of elements included in a "full record" in another database. (The target may use "F" as the default element set name.)

3.2.2.1.5 Preferred-record-syntax

The parameter Preferred-record-syntax identifies the preferred abstract syntax for the records to be returned, from among the set of abstract syntaxes for records for which presentation contexts are currently established for this application association. If the target cannot supply the information in the requested abstract syntax, it will supply it in one of the other abstract syntaxes from the established set.

3.2.2.1.6 Small-set-upper-bound, Large-set-lower-bound, and Medium-set-present-number

The result set is considered a "small-set," "medium-set," or "large-set," depending on the values of parameters Small-set-upper-bound and Large-set-lower-bound of the Search request, and Result-count of the Search response (see section 3.2.2.1.8). The result set is a small-set if Result-count is not greater than Small-set-upper bound. The result set is a large-set if Result-count is larger than or equal to Large-set-lower-bound. Otherwise, the result set is a medium-set.

If the query results in a small-set, all database records identified by the result set are to be returned to the origin (subject to possible message size constraints). If the query results in a large-set, no database records are to be returned. If the query results in a medium-set, the maximum number of database records to be returned is specified by Medium-set-present-number.

Notes:

3.2.2.1.7 Database/diagnostic-records

The target processes the search, creating a result set that identifies a set of database records. It cannot be assumed however that search processing requires physical access to the database records; thus one or more records might not be returnable, but this circumstance might not be recognized until an attempt is made to transfer such a record.

After processing the search, the target attempts to retrieve the first N records identified by the result set, to be included in the Search response (N depends on the search parameters and result-count, as described in 3.2.2.1.6). For each record that cannot be returned, a surrogate diagnostic record is substituted. Thus the parameter Database/diagnostic-records is one of the following:

The order of occurrence of records (database and/or surrogate diagnostic) within the parameter Database/diagnostic-records is according to the order in which they are identified by the result set. Each database or surrogate diagnostic record may optionally be accompanied by the name of the database in which the record resides. However, the database name must accompany the first database or surrogate diagnostic record being returned, and must accompany any record coming from a database different than its immediate predecessor.

3.2.2.1.8 Result-count and Number-of-records-returned

The parameter Result-count is the number of records identified by the result set. If the result set is empty, result-count is zero. The parameter Number-of-records-returned is the total number of records (database and diagnostic) returned in the Search response.

3.2.2.1.9 Next-result-set-position

The parameter Next-result-set-position specifies the position within the result set of the next record following those returned (or zero if the last record in the result set is being returned).

3.2.2.1.10 Search-status

The parameter Search-status, returned in the response, assumes one of the following two values:

A value of "success" does not imply that the expected database and/or surrogate diagnostic records are being returned as part of the response (see Present-status, 3.2.2.1.11). Note also, a value of "success" does not imply that any records were located by the search. A value of "failure" does imply that none of the expected database and/or surrogate diagnostic records are being returned. In the latter case, the target returns a single diagnostic record indicating that the search cannot be processed.

3.2.2.1.11 Result-set-status and Present-status

These are status descriptors necessary to disambiguate certain situations that can occur during search and present operations.

Result-set-status occurs if and only if the value of Search-status is "failure," and its value is one of the following:

Present-status occurs if and only if the value of Search-status is "success," and its value is one of the following:

3.2.2.1.12 Reference-id

See section 3.4

3.2.3 Retrieval Facility

The Retrieval facility enables the origin to retrieve a copy of records according to position within a result set maintained by the target.

3.2.3.1 Present Service

The Present service allows the origin system to retrieve records from a specified result set. Records are referenced by relative position within the result set. The origin specifies a range of records to be retrieved and may follow with subsequent requests specifying different ranges. For example, the origin may retrieve records one through five and follow with a request for records four through six. See Table 3.

                   Table 3: Parameters of the Present Service

                                   Origin          Target
        Parameter                  Request         Response

   Number-of-records-requested     x
   ______________________________________________________________________
   Result-set-start-position       x
   ______________________________________________________________________
   Result-set-id                   x
   ______________________________________________________________________
   Element-set-names               x (opt.)
   ______________________________________________________________________
   Preferred-record-syntax         x (opt.)
   ______________________________________________________________________
   Database/diagnostic-records     x (opt.)        x (if appl.)
   ______________________________________________________________________
   Number-of-records-returned                      x
   ______________________________________________________________________
   Next-result-set-position                        x
   ______________________________________________________________________
   Present-status                                  x
   ______________________________________________________________________
   Reference-id                                    x (if appl.)

3.2.3.1.1 Number-of-records-requested and Result-set-start-position

The origin requests the return of N records beginning at record M, from the result set, where N = Number-of-records-requested and M = Result-set-start-position (and N is not greater than [Result-count - M] + 1).

3.2.3.1.2 Result-set-id

Result-set-id specifies the result set from which records are to be retrieved. It is the result set created by a previous Search request for which the value of the parameter Result-set-name matches the value of Result-set-id.

3.2.3.1.3 Element-set-names

The parameter Element-set-names describes the preferred composition of the records expected in the Present response. See section 3.2.2.1.4.

3.2.3.1.4 Preferred-record-syntax

See section 3.2.2.1.5.

3.2.2.1.5 Database/diagnostic-records

The parameter Database/diagnostic-records returned by the target consists of one of the following:

The order of occurrence of records (database and/or surrogate diagnostic) within the parameter Database/diagnostic-records is according to the order in which they are identified by the result set. Each database and/or surrogate diagnostic record may optionally be accompanied by the name of the database in which the record resides. However, the database name must accompany the first record being returned, and must accompany any record coming from a database different from its immediate predecessor.

3.2.3.1.6 Number-of-records-returned and Next-result-set-position

The parameter Number-of-records-returned is the total number of database and diagnostic records returned. Next-result-set-position is the position within the result set of the next record following the last database or surrogate diagnostic record being returned (or zero, if the last database or surrogate diagnostic record in the result set is being returned).

3.2.3.1.7 Present-status

Present-status is mandatory in a Present response and its values are the same as those listed for Present-status in 3.2.2.1.11.

3.2.3.1.8 Reference-id

See section 3.4.

3.2.4 Result-set-delete Facility

The Result-set-delete facility enables an origin to instruct a target system to delete one or more result sets known to the target. The target responds with information pertaining to the result of the operation.

3.2.4.1 The Delete Service

The Delete service enables an origin system to send a Delete request to the target. The origin may request deletion of specified result sets held by the target or all result sets currently on the target created during this association. The target responds by reporting the status of the requested delete operation. See Table 4.

                   Table 4: Parameters of the Delete Service

                                   Origin          Target
        Parameter                  Request         Response

   Delete-operation                x
   ______________________________________________________________________
   Result-set-list                 x (if appl.)
   ______________________________________________________________________
   Delete-operation-status                         x
   ______________________________________________________________________
   Delete-list-statuses                            x (if appl.)
   ______________________________________________________________________
   Number-not-deleted                              x (if appl.)
   ______________________________________________________________________
   Bulk-statuses                                   x (if appl.)
   ______________________________________________________________________
   Delete-msg                                      x (optional)
   ______________________________________________________________________
   Reference-id                    x (optional)    x (if appl.)

3.2.4.1.1 Delete-operation

The origin specifies one of the following:

3.2.4.1.2 Result-set-list

If Delete-operation is "list," then the parameter Result-set-list must be present. It specifies a list of result sets to be deleted, which were created by previous Search requests (in which the value of the parameter Result-set-name matches the value of one of the members of the list). If Delete-operation is "bulk-delete," then the parameter Result-set-list must not be present.

3.2.3.1.3 Delete-operation-status

Delete-operation-status is used by the target to report the status of the delete request. It assumes one of the values "success" or "failure-3" through "failure-9" in Table 5.

                   Table 5: Delete Statuses

      Status     Description

______________________________________________________________________ success Result set(s) deleted. ______________________________________________________________________ failure-1 Result set did not exist. ______________________________________________________________________ failure-2 Result set previously unilaterally deleted by target. ______________________________________________________________________ failure-3 System problem at target (optional text message may be included in the Delete-msg parameter). ______________________________________________________________________ failure-4 Access-control failure: the delete request caused the target system to issue an Access-control request, which the origin system failed to satisfy, or the origin could not accept an Access-control request. ______________________________________________________________________ failure-5 Request terminated by origin system through resource control. ______________________________________________________________________ failure-6 Access terminated by target system due to resource constraints. ______________________________________________________________________ failure-7 Bulk delete of result sets not supported by target. ______________________________________________________________________ failure-8 Not all result sets deleted (on a bulk-delete request) (see 3.2.4.1.5). ______________________________________________________________________ failure-9 Not all requested result sets deleted (on a list request). Note: failure-7 and failure-8 cab occur only if Delete-operation is Bulk-delete.

3.2.4.1.4 Delete-list-statuses

Delete-list-statuses is present in a Delete response for a list operation. It contains the same Result-set-id(s) contained in the Result-set-list parameter of the corresponding Delete request. Each result-set-id in the Delete-list-statuses parameter is paired with a status. Possible status values are "success" and "failure-1" through "failure-6" in Table 5.

3.2.4.1.5 Number-not-deleted and Bulk-statuses

These two parameters occur only if Delete-operation is Bulk-delete and if Delete-operation-status = "failure-8." The parameter Number-not-deleted indicates how many result sets were not deleted, and the parameter Bulk-statuses gives individual statuses for those not deleted.

Note, however, that a target system is not obligated to provide statuses for each result set not deleted on a bulk delete. For example, a target system may abort a bulk delete when the first failure to delete a result set that is part of the bulk delete fails; in this case only a single status might be included in the parameter Bulk-statuses.

If a bulk delete results in more statuses than can fit into a single Delete-response message, the target system may discard those that do not fit.

3.2.4.1.6 Delete-msg

Delete-msg, if present, contains an optional text message.

3.2.4.1.7 Reference-id

See section 3.4.

3.2.5 Access Control Facility

The Access control facility allows a target system to challenge an origin system during execution of an Init, Search, Present, Delete, or Resource-report operation. See Table 6.


              Table 6: Parameters of the Access Control Service

                                   Origin          Target
        Parameter                  Request         Response

   ______________________________________________________________________
   Security-challenge              x
   ______________________________________________________________________
   Security-challenge-response                     x
   ______________________________________________________________________
   Reference-id                    x (if appl.)    x (if appl.)

3.2.5.1 Access-control Service

An origin system must be prepared to accept and respond to one or more Access-control requests while an Init, Search, Present, Delete, or Resource-report request is being executed by the target system (unless the parameter Options of the Init request, which initiated the connection, did not include Access-control; see 3.2.1.1.2). For example, after sending a Search request, the origin must be prepared to receive an Access-control request, respond with an Access-control response, then later receive another Access-control request, etc., before receiving a Search response.

Once the origin has responded, the operation proceeds as if the challenge has never taken place. If the origin system fails to respond correctly to the challenge during a Search, Present, Delete, or Resource-report request, then the respective response may indicate that the operation was terminated due to an Access-control failure. (Note: During a Search or Present operation, while the target is preparing records for presentation, it might send an Access-control request pertaining to a particular record. If the origin fails to respond correctly to the challenge, the target may simply substitute a surrogate diagnostic: "security challenge failed; record not included.") If the origin system fails to respond correctly to the challenge during an Init request, the target may set the Result parameter to "reject" and may (optionally) supply such an indication in the User-information-field of the Init response.

The Access-control request/response mechanism can be used to support password challenges, public key cryptosystems, algorithmic authentication, etc. The specific content of the Access-control request and response parameters are outside the scope of this standard.

3.2.5.1.1 Security-challenge and Security-challenge-response

The contents of these two parameters are outside the scope of this standard and must be established by prior agreement between a given target/origin system pair.

3.2.5.1.2 Reference-id

See section 3.4.

3.2.6 Accounting/Resource Control Facility

The Accounting/Resource Control facility consists of the Resource-control service (initiated by the target during a Search, Present, or Delete operation), the Trigger-resource-control service (initiated by the origin during a Search, Present, or Delete operation), and the Resource-report service (initiated by the origin when no operation is pending).

The Resource-control service permits the target system to send a Resource-report, notifying the origin system when either actual or predicted resource consumption will exceed agreed upon limits (or limits built into the target system), and to obtain the origin system's consent to continue the operation. In addition, the target system can inform the origin system about the current status of a result set being generated on the target in response to a Search request, and indicate information about the status of the current request to the origin.

The Trigger-resource-control service permits the origin system to request that the target initiate the Resource-control service, or cancel the current operation.

When no operation is pending, the Resource-report service permits the origin system to request that the target send a Resource-report.

3.2.6.1 Resource-control Service

A target system may issue a Resource-control request following receipt of an Init, Search, Present, or Delete request, prior to issuing the corresponding Init, Search, Present, or Delete response.

The target indicates whether a response to the request is required:

An origin should be prepared to receive, and (conditionally) respond to, multiple Resource-control requests during the execution of an Init, Search, Present, or Delete request.

If the origin responds to a Resource-control request with a Resource-control response saying to terminate the operation, it can expect to receive an Init, Search, Present, or Delete response. This response might indicate that the operation was terminated at origin request. However, the response might alternately indicate that the operation completed, since the operation at the target system may continue to execute and subsequently complete before the Resource-control response reaches the target system. See Table 7.

3.2.6.1.1 Resource-report

Resource-report may be used to convey information about the current and estimated resource consumption at the target system. The format of Resource-report bib-1 is defined in Appendix F.


         Table 7: Parameters of the Resource Control Service

                                   Origin          Target
        Parameter                  Request         Response
   ______________________________________________________________________
   Resource-report                 x (opt.)
   ______________________________________________________________________
   Partial-results-available       x (if appl.)
   ______________________________________________________________________
   Suspended-flag                  x (if appl.)
   ______________________________________________________________________
   Response-required               x
   ______________________________________________________________________
   Triggered-request-flag          x (opt.)
   ______________________________________________________________________
   Continue-flag                                   x
   ______________________________________________________________________
   Result-set-wanted                               x (if appl.)
   ______________________________________________________________________
   Reference-id                   x (if appl.)     x (if appl.)

3.2.6.1.2 Partial-results-available

The target indicates the status of the result set via the flag Partial-results-available, whose value is one of the following:

This parameter is meaningful only during a search operation. If its value is "subset" or "interim," then the target will accept subsequent Present requests if the current request is terminated by the Resource-control response, and if the value of the parameter Result-set-wanted is "on."

If the value of Partial-results-available is "none" then the target need not accept subsequent Present requests in the event that the request is terminated by the Resource-control response.

Note that if Suspended-flag is off, the partial results available situation may change since processing continues on the search. In all cases, the values of Search-status and Result-set-status in the Search response should be treated as the authoritative information.

3.2.6.1.3 Suspended-flag

The target system indicates whether or not processing of the command has been suspended pending the Resource-control response. This flag occurs if and only if the value of Response-required is "yes."

3.2.6.1.4 Response-required

The target system indicates whether or not a response (from the origin) to this request is required.

3.2.6.1.5 Triggered-request-flag

The target system may optionally indicate whether or not this request resulted from a Trigger-resource-control request from the origin.

3.2.6.1.6 Continue-flag

The origin indicates to the target whether or not to continue processing.

3.2.6.1.7 Result-set-wanted

This flag is meaningful only:

If the value of the flag is "on," the target will maintain the (possibly partial) result set for subsequent Present requests. If the value of the flag is "off," the target may delete the result set. A result set status of "none" on the subsequent Search response indicates that the target has discarded the result set. In all cases, the values of Search-status and Result-set-status in the Search response describe the actual decisions made by the target system and the way in which the search terminated.

3.2.6.1.8 Reference-id

See section 3.4.

3.2.6.2 Trigger-resource-control Service

An origin system may issue a Trigger-resource-control request following an Init, Search, Present, or Delete request, prior to receipt of the corresponding response. The request serves as a signal to the target system that the origin wishes the target to:

The target is not obligated to take any specific action upon receipt of a Trigger-resource-control request. For the purpose of procedure description, there is no response to the request; if the target wishes to issue a Resource-control request it does so unilaterally. (If the origin issues a Trigger-resource-control request and subsequently receives a Resource-control request, the origin cannot necessarily determine whether the latter resulted from the Trigger-resource-control request. However, the target may include Triggered-request-flag in the Resource-control-request to so indicate.)

If the origin issues a Trigger-resource-control request saying to cancel the command, and if the target honors the request, the origin can expect to receive an Init, Search, Present, or Delete response indicating that the request was terminated at origin request.

Although an origin system may issue a Trigger-resource-control request only prior to receipt of an Init, Search, Present, or Delete response, the target might issue such a response before it receives the Trigger-resource-control request. In that case, the target will ignore the Trigger-resource-control request. Furthermore, the target might receive a Trigger-resource-control request after issuing a Resource-control request, while awaiting a Resource-control response. In that case, again, the target should ignore the Trigger-resource-control request. (Note that in general, the target may ignore any Trigger-resource-control request.) See Table 8.


     Table 8: Parameters of the Trigger Resource Control Service

                                      Origin
        Parameter                     Request

   Requested-operation                x
   ______________________________________________________________________
   Preferred-resource-report-format   x (if applicable)
   ______________________________________________________________________
   Result-set-wanted                  x (if applicable)
   ______________________________________________________________________
   Reference-id                       x (if applicable)

3.2.6.2.1 Requested-operation

The origin indicates one of the following:

3.2.6.2.2 Preferred-Resource-report-format

This parameter is meaningful only when the value of the parameter Requested-operation is "resource-control" or "resource-report." It identifies a resource report format that the origin prefers.

3.2.6.2.3 Result-set-wanted

This flag is meaningful only during a Search request and when the value of the parameter Requested-operation is "cancel." If the value of the flag is "on," the origin requests that the target maintain the (possibly partial) result set for subsequent Present requests. See section 3.2.6.1.7.

3.2.6.2.4 Reference-id

See section 3.4.

3.2.6.3 Resource-report Service

The origin may issue a Resource-report request following receipt of an Init, Search, Present, or Delete response from the target. The target responds with a Resource-report response.

Note: The Resource-report service is a confirmed service and as such differs from the Trigger-resource-control service, which is non-confirmed. The origin may invoke the Resource-report service only in the "open" state, that is, following the conclusion of an operation (Init, Search, Present, Delete, or Resource-report) and prior to initiation of a subsequent operation. Therefore a Resource-report request from the origin requires a response from the target. (If the response were not determinable, then the origin would not be certain when to initiate a subsequent operation. In contrast, when the origin issues a Trigger-resource-control request, it awaits an action from the target--either a Resource-control request or an operation response--and therefore the lack of a deterministic response does not present sequencing problems.) However, although the target is obliged to send a Resource-report response, the target is not obliged to include a resource-report in the Resource-report response. See Table 9.

3.2.6.3.1 Preferred-resource-report-format

Identifies a resource report format that the origin prefers.

3.2.6.3.2 Resource-report-status

The target supplies one of following status values:

3.2.6.3.3 Resource-report

See 3.2.6.1.1.

3.2.6.3.4 Reference-id

See section 3.4.


              Table 9: Parameters of the Resource Report Service

                                      Origin          Target
        Parameter                     Request         Response

   Preferred-resource-report-format   x (opt.)
   ______________________________________________________________________
   Resource-report-status                             x
   ______________________________________________________________________
   Resource-report                                    x (opt.)
   ______________________________________________________________________
   Reference-id                       x (opt.)        x (if appl.)

3.2.7 The Termination Facility

The Termination Facility allows either:

  1. an origin or target to initiate abrupt termination of the association via the IR-abort service element, or

  2. an origin to initiate graceful termination via the IR-release service.

The IR-abort and IR-release services map directly onto the A-ABORT and A-RELEASE services of the association control service element.

3.2.7.1 IR-abort Service

Either the origin or target may at any time either send or receive an IR-abort request, and consider the application association terminated.

3.2.7.2 IR-release Service

The origin may invoke an IR-release request following receipt of an Init, Search, Present, Delete, or Resource-report response. It should then await receipt of an IR-Release response, and then consider the association terminated. Alternately, it might receive an IR-abort request from the target, in which case it should consider the application association terminated.

The target may receive an IR-release request after sending an Init, Search, Present, Delete, or Resource-report response. It should then send an IR-release response, and consider the association terminated.

3.3 Message Size Limitations

For both the Search and Present services, it is possible that the target will not be able to return the number of database records requested because of message size limitations. In that case, the target is responsible for packing as many records as possible into the response message. (Note: A response message always contains an integral number of records; a record never spans response messages.)

Illustration

Assume that the target is attempting to transmit records in result set positions 1 through 10 (in this section, the term "record" means "database or surrogate diagnostic record," unless "diagnostic record" or "database record" is specified). Assume further that:

In case (a), the target returns records in position 1 through 6. In case (b), except as noted below (see "Exception"), the target substitutes a diagnostic record for the database record in position 7, indicating that the record exceeds Preferred-message-size. In case (c) the target substitutes a diagnostic record for the database record in position 7, indicating that the record exceeds Maximum-record-size. (If Maximum-record-size equals Preferred-message-size then there is no distinction between the meaning of the two diagnostics.)

In case (b) or (c) if the diagnostic record will not fit along with the records in position 1 through 6, the target returns the records in position 1 through 6. (Preferred-message-size must always be large enough to contain any diagnostic record; thus a subsequent Present request beginning with the record in position 7 will retrieve the diagnostic.) Otherwise, the target inserts the diagnostic record and proceeds to attempt to fit records in positions 8 through 10 into the response message.

Exception

If a Present request specifies a single record (i.e. Number-of-records-requested equals 1) then if the size of that record exceeds Preferred-message-size, but does not exceed Maximum-record-size, the target will return that single database record in the Present response. Note that this exception applies only to a Present request and not to a Search request.

Thus in case (b), the origin may subsequently request the database record in position 7, by issuing a Present request in which that record is the only record requested.

Note that the purpose of this distinction between Preferred-message-size and Maximum-record-size is to allow the transfer of normal length records to proceed in a routine fashion, with convenient buffer sizes, but to also provide for the transfer of an occasional exceptionally large database record without requiring the origin to continually allocate and hold local buffer space for worst-case records. Note also that this intended purpose is defeated if the origin routinely requests a single record.

3.4 Reference-id

The parameter Reference-id is optional in an Init, Search, Present, Delete, and Resource-report request. If supplied,

If Reference-id is not supplied in an Init, Search, Present, Delete, or Resource-report request, then it is not to appear in the respective response, nor in either the request or response of any intermediate Access-control or Resource-control request/ response sequence, nor in any intermediate Trigger-resource-control request.

The service does not assume any relationship between the Reference-id used in an Init, Search, Present, Delete, or Resource-report request and the Reference-id used in any other Init, Search, Present, Delete, or Resource-report request.

The purpose of this parameter is to facilitate the grouping of events by the origin system. This standard does not specify its contents. Reference-ids are always assigned by the origin and have meaning only within the origin system. Since there are no semantics attributed to this parameter, it has no implied datatype and can only be described as transparent binary data. It is therefore described as ASN.1 type OCTETSTRING.


Go Back to Table of Contents
nisohq@cni.org