In relation to my other question about modelling a real user-facing tree structure (Using firebase tree structure to represent a "document outline" structure directly), I was thinking of putting in place a generic approach to "symlinking", at certain nesting levels, to overcome the 32 nesting levels limitation and the need to fetch all sub-nodes at once.
Are there some "best-practices" for "symlinking" in firebase?
E.g.:
- syntax (contents, key-value structure) for a firebase node which would symbolise a link to another node
- should the symlink contain the path to the target node (absolute or relative?) or just some kind of globally unique id?
- API for a callback which would be triggered when the symlink content finishes loading asynchronously
I am envisioning a little wrapper API which would abstract the difference of whether the node is really there or is it accessed indirectly via "symlink". There could be an extra API method "now fetch me this/more" as the user wants more details on the displayed data (e.g. drilling down deeper in the tree), and it could fetch e.g. the next level of nesting (via callback), abstracting away whether the children's content was really there or just symlinked...
Does this seem like a good idea in general?