Skip to end of banner
Go to start of banner

Indexing structure

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Requirements

A supporting structure for indexing of buffer data needs to be created. This structure needs to be able to index elements and provide an easy querying system, that can support current use cases of inspectIT. Furthermore, the indexing structure needs to hold week references to the elements, so that these elements are garbage collected when they are evicted from the buffer. Structure also has to be able to clean it self, meaning that references to weak references have to be destroyed.

Approach

The indexing has a tree structure. It is consisted of several levels, where each level has several branches and indexes the element based on element's properties. On the last level the weak references are mapped, thus from the last level objects are access-able. This would allow fast searching for the elements, especially if a searching query has defined a property for each level. An example is shown in the picture below:

Realization

The model used for realization is same as the Composite design pattern (Composite pattern).ITreeComponent defines operations that are needed for the indexing structure, so that all tree components are able to perform them.

Branch and IBranchIndexer

Branch is a tree component that has references to other tree components (same as Composite in Composite pattern). This means that branch represents one level of indexing. To be able to correctly index elements and perform queries, branch uses functionality of IBranchIndexer. Different implementation of this interface index elements on different properties. Thus, the branch indexer is used when branch needs to determine right "next level" branch for the indexing element. The same stands for the searching of elements.

IBranchIndexer is also responsible to know which indexer has to be used on the next level. This is needed when tree is empty, and new elements should be indexed into branches/leafs that have not yet been created. Currently implemented indexers are:

  • Platfrom indexer - creates one tree component for each agent (each platfrom ident)
  • Sensor type indexer - creates one tree component for each sensor type (each sensor type ident)
  • Method indexer - creates one tree component for each method (each method ident)
  • Object type indexer - creates one tree component per class, meaning that all objects of the same class will be in one branch/leaf
  • Timestamp indexer - creates one tree component for every minute
  • No labels