Changes in dependency mapping

This topic describes cube dependency mapping.

Dependency behavior now follows these rules:

  • Dependencies once established are NOT cleared based on data invalidation.
  • Cube dependencies can be established ahead of time using the AddCubeDependency function.

When dependencies are created, the dependency lists are protected by an object lock between the cubes affected.

The fact that dependency lists are protected by an object lock and "hangs" off a cube has an important effect on application upgrade. The dependency blocks writers as well as readers from a cube object when a reader queries a cube and when there is a need to add or write to the dependency list object for that cube. This lock persists for the duration of the read query. For fast queries, this impact is minimal and a one time "cost" for each cube-to-cube dependency. For slower queries, however, other users may be blocked for usually long periods. In complex applications, the dependency object may be locked many times initially as users execute only certain rules. Here is an example:

Cubes E and F point to D, Cubes C and D point to B, Cube B points to A

In this example, the arrows show data flow based on rule connections. Cube B has a two rules: one that pulls from Cube C and the other pulls from Cube D. Cube D has a single rule that pulls from Cubes E and F.

Diagram with cubes A to F, with Cube C highlighted and pointing to highlighted Cube B

When User 1 reads from Cube B, a rule calculated there requires data pulled from Cube C. So Cube B, C and related cube objects are blocked until User 1's query is completed.

Diagram showing cubes A to F, with Cubes B, D, E, and F highlighted

When User 2 reads from Cube B, a rule calculated there requires data pulled from Cube D. Cube B, D, and related cube objects are now blocked until User 2's query is completed.

To address this situation, the TurboIntegrator function AddCubeDependency was created to establish dependencies. This function allows users to establish dependencies after events such as a re-start of the server.