Turtles all the way down (or is it up?)
In today's release of cowdb0.8.4, persistent objects now all have names. Turns out, this simplifies things, as branches and forks already had names. It also lays some interesting groundwork for making cowdb much easier to work with, aside from providing the basis for symbolic references (via handles) and deep copies. But the first thing we need to do is to introduce some new terminology--yet to be implemented.
The most important term in a COW DB is index, for it is only via an index that structures other than trees can be built. What was the fork table will become the primary index, and top will become the secondary index. All persistent objects will have access (via control or via an association with the current thread using a weak reference hash) to their index, and all logical blocks will be accessible via their index using their name as the key. (Logical blocks being persistent objects which reside in a physical block on disk, while other persistent objects must make do with residing in containers which themselves are logical blocks.)
Notice now that we have introduced the idea of levels, where system objects are at the first level and other objects are at higher levels. Branches then will be in the primary index along with the fork objects which manage disk space allocation for a branch. And with careful symmetry then, we can have branches at any level--which gives us deep copies.
So now that I have everything working so well (0.8.4 was primarily a bug release), it is time to dig in and do a bunch of refactoring. Cheers!
0 Comments:
Post a Comment
<< Home