Ref collection aliases
October 26th, 2004 at 4:50 pm (3 years, 10 months ago) by Andi Vajda under chandlerdbRef collections, double-linked lists of bi-directional item references, are backed by a hashtable keyed on the referenced items UUIDs. Ref collections - designed with scalability in mind - are sparsely loaded into memory on an as-needed basis. A second set of keys, reference aliases - name strings - can be used to address a reference in the collection directly. The alias for a referenced item is set for the reference in the collection, not for the item. This means that an item referenced in many ref collections, may have as many different aliases for these references set in them.
This feature started as an afterthought to quickly lookup attribute items defined for a kind. It proved much more generally useful than first thought and had to be reworked for scalability. The persistence layer in the repository implements a name store, a B-tree of triples that given a UUID and a name hash returns the third element, the corresponding UUID. For example, given the ref collection’s UUID and an alias string hash, the name store quickly retrieves the UUID of the corresponding reference key in the ref collection, that is, the UUID of the referenced item sought. The name store is also used to retrieve the UUID of child items during a Path-based search. Given the UUID of the parent and the name hash of the child item sought, the name store returns the UUID of that child item. The ref collection alias feature is becoming more generally used as a way to locally name an item - a reference actually - in a collection and alias parameters were added to a number of data model APIs.







