DAG-enforcement versus garbage-collection?
"Rob Meijer" <rmeijer-qWit8jRvyhVmR6Xm/[email protected]>
| Newsgroups | gmane.comp.capabilities.general |
|---|---|
| Message-ID | <[email protected]> |
Working on a new version of CapFs (that I'm considering a rename for to RumpelstilskinFs), I come to the act of deleting files. In the old CapFs, there was a real distinction between files created in the main tree structures, and symbolic links. In the upcoming version this distinction becomes less clear, making some kind of reference counted delete a potential alternative to soft-link-braking deletes. This in turn however raises an interesting pseudo-philosophical design question. A question that I think I can best pose in the form of an hypothesis : "The principle of least authority and cyclic references are mutually exclusive" If I assume that this hypothesis is true, than the option of introducing a DAG-violation error when a file-system user tries to create a link that would violate the directed-acyclic-graph structure of the file-system would likely be a much better option than one that uses garbage collection algorithms. With my limited imagination I've not been able to come up with a scenario where a DAG structure either wasn' t possible or did not improve the POLA properties of the cyclic-reference alternative, at least for the file-system scenario, and given that any GC solution I've found greatly degraded the least-authority aspect, by giving the collector an abundance of authority, I'm inclined to take the above hypothesis as an axiom. If we zoom out a bit from the specific file-system scenario, I would be very interested to learn if anyone knows of any example that would proof this hypothesis false. And if this hypothesis can indeed be proofed false with such an example, I would still be interested in learning if a system that strictly enforces the DAG structure of permission graphs would be prohibitively restrictive for the creation of least-authority based system designs. That is, are there examples where a DAG based alternative to a cyclic graph would either not be possible, will yield worse adherence to POLA, or would be restrictively more inconvenient than the cyclic alternative. For CapFs, a GC algorithm currently seems like a really bad fit, but DAG enforcement would be relatively easy to fit in combined with basic reference counted deletes. If DAG-enforcement would generally be a good POLA concept, it would be a really interesting addition.