Directory Layer C++

Hi

I am curious why no directory layer was implemented for C++ bindings. And also if it is possible to implement a directory layer similar to Java api in C++. If yes, how would one go around it? Is there any design document for Directory Layer?

1 Like

If you wanted to use the directory layer in C, you’d also need at least some of the tuple layer in C, too.

You can have C code “cooperate” with the directory layer by allocating the directory with some Python code (or whatever), and then finding the subspace prefix that has been assigned, and feeding that to the C code for usage with all of its keys.

I am actually planning to create the Tuple layer too for C++. I am mostly unsure about the mappings which fdb does to store directory and subspace prefix, how does it track them back while reading the key.

You can find the C++ implementation of the directory layer in the Flow binding section.

I’m not sure if there are other examples, but the fdb-document-layer seems to be using the Directory.

Disclaimer: I wrote a proposal to the Directory-layer/Partition for the Rust-binding a few months ago.

There is not a lot of design documentation about the Directory {Layer,Partition}. Most(if not all) community bindings and official(go/java/python) have backported the flow code directly. Implementation can be checked with the BindingTester.