...
Leaf is the element on the deepest level in the tree. All objects that are referenced in one leaf have the same indexing path.
LeafingBranch
Warning | ||
---|---|---|
| ||
Leafing branch was removed due of the conclusions that memory space it takes are too expensive. The speed in query gained was very small on the other hand. |
LeafingBranch is the special type of branch that has an extended functionality to hold references to all objects that are indexed in this branch. This means that same element can be referenced from one leaf, but also many leafing branches. The advantage is speeding up the queries that need to traverse through whole branch because query does not define property for lower level branching. In this case, leafing brunch can just return results from its own leaf, with no need to look into all tree components below it. The disadvantage is the memory size needed for the indexing structure, because it rises linearly depending on the number of levels that use leaf branch.
...
- Normal branches need to be used for branches in the upper indexing levels and in branches that have a small number of referring tree components. A good example would be branch that would use platform indexer.
- Leafing branches need to be used for branches in the lower indexing levels and in branches that have a big number of referring tree components. A good example would be branch that would use time stamp indexer.
Updates to the indexing structure from version 1.4
The indexing structure has heavily increased and is more complicated in version 1.4 of inspectIT. This was need to support the storing of the storage data in the same tree as we use for the buffer. The main difference is that the indexing for the buffer is indexing elements passed, while indexing for the storage indexes the information where will indexed elements be saved to the disk, like file, position and size.
The updates are following:
- The interface ITreeComponent defines general tree operations like put, get, etc. The buffer and storage specific operations are in the IBufferTreeComponent and IStorageTreeComponent respectively. The ITreeComponent define two generic values, one for the type of the element that is indexed in the tree, and the second is type that will be actually saved in the tree. IBufferTreeComponent can index DefaultData elements and returns also DefaultData elements, while IStorageTreeComponent can also index DefaultData objects, but returns the IStorageDescriptors as the result of indexing.
- The AbstractBranch class was introduced to hold the general branch implementation. Branch and StorageBranch extend the mention abstract class, and implement the proper IBufferTreeComponent and IStorageTreeComponent respectively.
- The buffer indexing side has only one leaf type - called Leaf. On the other hand we have two types of leafs. The ArrayBasedStorageLeaf is the one that creates one StorageDescriptor for every element indexed, keeping complete information about position and size of the element in the file. On the other hand the LeafWithNoDescriptors keeps only the track of the total size of indexed elements. The trade back is following: the ArrayBasedStorageLeaf can provide the precise information where the element of the given ID is saved, but the size of the leaf in memory is much bigger (on disk also) and grows with the number of indexed elements; the LeafWithNoDescriptors does not grow at all and has a constant small size, but can only provide information about total size of all elements in the leaf, meaning that for finding the element with given ID we need to de-serialize every object in the leaf and find the one with given ID.
- The class CombinedStorageBranch is utility class that actually delegates all operations to the set of IStorageTreeComponent. This class should be used for read-only purposes. When element is requested the first tree component that has the indexed element will be asked to provide the information. When query is executed, the result from all tree component will be combined and returned.
- The branch indexers have also been re-factored. Storage branches use IStorageTreeIndexer and old buffer Branches use IBufferTreeIndexer. Both types of indexers delegate the basic ITreeIndexer operations to the delegate indexer. Currently there is a set of 7 possible delegate indexers (SQL string indexer is not shown in the UML diagram) that can index objects based on the: class, time-stamp, platform ident, method ident, sensor type ident, has children property (only InvocationSequenceData), SQL string (only SQLStatementData).
Querying the indexed tree
Please refer to Querying the indexed tree for information and specification about indexed tree querying system.
...