Having conquered containers, I have now branched out into implementing (or rather RE-implementing) linkers. Linkers are a global storage system to mark off the inter-relations between nodes in the database.
 
I’ve redone it based on the experiences I’ve had.
 
First and foremost, I no longer insist that each container store its own links. On SQL system you end up with dozens of empty tables, and pretty much it boils down to a single container that seems to have all of the interlinks. So the new Tao pretty much assumes that there is one (there can be more) linkers. A linker is treated like any other Container, save that the system recognizes that they are descended from tdif.container.linker, and they get added to the search list.
 
Nodes can also advertise their own links, if they inherit from tdif.element.linked, and implement their own “links” method.
 
Links are no longer queried directly from the containers, or from the nodes. Instead you ALWAYS go to tdif.
 
tdif nodeLinks [node]
 
Will return a dict containing all of the nodes linked to a node, nested with the type. Er, that doesn’t make sense, so lets go to an example:
 
tdif nodeLinks person-jane
> {parents {person-martha person-john} siblings {person-dick person-sally}}
 
I have an entire test suite that implements a pretty complex family tree and checks all of the inter-relations. God I love test suites.
 
The next major lesson I’ve learned from Tao’s previous incarnation is that not all links are reflexive. Let’s go to our storybook family Dick, Jane, and Sally.
 
Dick is Sally’s Brother, while Sally is Dick’s Sister.
Martha is Dick’s mother, while Dick is Martha’s son.
August 9, 2007
Linkers... get your linkers
Tao Development Blog