Personal tools


Node

From OrganicDesign

Jump to: navigation, search

In the nodal model, the items that make up the nodal network content are more similar to object's in the common OO paradigm than to files, because they exist and undergo change at runtime and exhibit a persistent globally unique identity which is independent of their state or content.

They are also more akin to objects in that they take the form of a container of associations which are like an object's properties and methods, and that they define a runtime environment consisting of special properties like this, name, parent, type etc which are available within the context of any object's methods when they are executing. This allows the executing code to navigate and manipulate the object structure from the point of view of the executing method.

The main difference between a node and a traditional object is in the way the parent and class/type properties have been handled. In the nodal modal, the two form an axis with the current working context (usually the parent) called Template:Down below, and the type/class aspect containing all the node's processes and knowledge above called Template:Up (these have also been called father above and mother below after the philosophical principles from which this dialectic method is derived).

In addition to this vertical, hierarchical dimension formed from Template:Up and Template:Down, there's also a horizontal dimension formed from Template:Left and Template:Right which allows the description, navigation and manipulation of sequences of content or processes purely through nodal structure, which is geometric rather than syntax based. It means processes all have a common way of talking about order and time, and can be used to build the next layer of common functionality called generic organisation.

    

[[+compass|]]

Contents

1 Associations

An associative array (also map, hash, dictionary, finite map, lookup table, and in query-processing an index or index file) is an abstract data type composed of a collection of keys and a collection of values, where each key is associated with one value. The operation of finding the value associated with a key is called a lookup or indexing, and this is the most important operation supported by an associative array. The relationship between a key and its value is sometimes called a mapping or binding. For example, if the value associated with the key "bob" is 7, we say that our array maps "bob" to 7. Associative arrays are very closely related to the mathematical concept of a function with a finite domain. As a consequence, a common and important use of associative arrays is in memoization.

Nodal associations

From the perspective of a programmer using an associative array, it can be viewed as a generalization of an array: While a regular array maps integers to arbitrarily typed objects like integers, strings, pointers and objects, an associative array maps arbitrarily typed objects to arbitrarily typed objects.

In the nodal model, the node is the only kind of entity that exists, so all the keys and values contained by any node must both be node references. Nodes reside in a lower-level data structure called list space and uses a method called binary traversal which is what enables this associative-array-like functionality.

  • In the nodal model, associations are not ordered, ie there is no atomic process which can iterate through the associations
  • See example nodal structures for diagrams of various nodal structures.
  • It is possible for a number of keys to have the same value, effectively allowing the same instance to be in many places at the same time
The null association

Due to the way that list space works, there arrises the possibility of a so-called null-association which involves a zero-length traversal. There is however nothing inherently special about the null association apart from the fact that it involves the least processing time, so it makes sense that the most commonly used association be the null association.

2 Non-nodal data (state)

All nodes can have non-nodal content like file-handles or objects associated with them similar to the way emails can have non-plain-text data as attchments. Every node exhibits such a state which is its encapsulation of the concept it represents in terms of the local runtime environment. If the node has no representation in terms of the local environment, then a request of its state returns the local representation of void.

The peerd.c implementation maintains a list of pointers (the **pointers global variable) to non-nodal content. Node's values can be used as an index into the pointer list instead of as a node reference.

3 Syntax & functions

On languages that support it, a Nodal Space can be implemented by sub-classing the standard associative array syntax and methods to allow the use of associative-array-references as array-keys rather than strings or numbers. For languages that don't support this level of object-orientedness, the Nodal Space must be implemented using functions or methods with a list of associative-array-references as a path parameter.

  • get/set association value
  • insert/remove association key
  • insert/remove item into/from loop
  • reduce
  • traverse

4 Notes

  • Key:Value is Class:Instance because every Class already exists elsewhere in the structure, and every Instance is unique and not previously existent.
  • It has to be that way because the Current's and Next's are unique to the context, so the same instance can't appear in more than one at once.
  • Having the list-aspect made wco associations also makes the list-space model simpler by requiring only binary-traversal.

5 See also