Directory Layer design document

Is there a design document for the directory layer similar to the one provided for the tuple layer?

I’m wondering about the exact way the directory allocator works, how the directory path keys are formatted and how the values of those keys map to the prefixes of descendant keys.

I don’t think there is one out there. I believe I started to work on one, but then I got distracted.

There is actually a blob post from a community member on how the high contention allocator works, which is a good read:

The main mapping part of the directory layer are essentially keys that include the long string as the key and a (tuple-encoded) integer as the value. Then for child values, there are keys that are prefixed by the shortened value of their parent and then include their long string as the key and a different (tuple-encoded) integer as the value. The value in each case is the prefix in the database where the data for that directory should be stored. Note that the directory prefix does not include the parents’ prefixes, which means that directories can be moved around only by manipulating the directory layer. The downside is that to resolve a path, you must read one key (in serial) for each directory entry.

I’m not actually sure if that was your question, though.