Finished implementing the new API and internal architecture of CowDb. Updating the samples, tests and docs (and likely, more debugging) is what remains. Release should be in 1 or 2 days.
There are now several subclasses of PNode: RootNode, IndexNode and InternalNode. Each of these classes is associated with a role which requires specialialized behavior on the part of the node. There are now 11 subclasses of App for associating application logic (capabilities) with a node. Adding to that, PHandle is a paramaterized class whose behavior is governed by the handle type--and there are 5 types of handles. Overall, that makes for a pretty rich and flexible architeture. And you can easily extend it with new Node and App subclasses.
In this new version of CowDb I'm introducing the idea of a role. Within a graph of nodes there are various roles to be performed. And Nodes are created/configured by the CowDb factory based on the role. And there are 23 different roles defined.
The role determines the class of the node, the class of the associated App class, the handle type and the Internal Node role. And all of this can now be configured using the CowdbFactory.plugin method. Creating a new node is a simple matter of calling
PNode add(String role, String name) on an existing node--this inserts the new node in the same physical block as the container node. But if you want the new node to have it's own physical block, then you call
PNode addReference(String role, String name) instead. (The rest of the new API is just as easy to use, and a considerable improvement over the old API.)
The new CowDb then is very very extensible, and it is quite easy to extend--once I update those docs!