Previous Table of Contents Next


4.3 Current Version and Transactions

   The DAF interfaces are intended to be useful for a wide variety of data providers with and without transaction support. The DAF interfaces may be used in conjunction with CORBA Transactions where the data provider supports transactions.

   On the other hand, DAF interfaces can be implemented by realtime, legacy, or other systems where transaction support is not available.

   The following protocol must be implemented by all data providers and may be implemented by any client.

Client Data Provider
Invokes current_version() Returns X
Invokes ResourceQueryService operations. Returns query results.
Invokes current_version() Returns Y such that X = Y != 0 only if query results are consistent.

   The definition of consistency is determined by the implementation of the data provider and is beyond the scope of this specification.

   The response of the client to potentially inconsistent query results (when X != Y or Y = 0) is implementation-specific. A client may retry the same query sequence in an attempt to obtain consistent results.

   A data provider that never produces inconsistent results may implement current_version() to return the same, non-zero value on every invocation. Assuming the value 1 was chosen, X = Y = 1 in every query scenario. As a special case, this applies to data providers that produce constant results for queries.

   A data provider that implements CORBA transactions is not required to report potentially inconsistent results via current_version(). It may implement current_version() to return the same, non-zero value on every invocation. It is assumed that clients will bracket queries with a transaction if consistent results are required.

   Other data providers must implement a strategy for generating current_version() values so that X = Y !=0 implies the query results gathered between X and Y are consistent. Examples are provided in the next section.

   The protocol is illustrated in the following interaction diagram:

   client event source : Resource query service : ResourceQuery EventSource Service

Figure 4-2 current_version() Diagram