Difference between revisions of "Nodal reduction"

From Organic Design wiki
(add summary)
m
Line 7: Line 7:
 
*[[Root]] ''- the nodal content of the root node''
 
*[[Root]] ''- the nodal content of the root node''
  
 
=== Overview ===
 
A [[Nodal Space]] includes a process called ''Nodal Reduction'' which is an execution model, or [[Wikipedia:Runtime|runtime]] environment which uses generic organisational concepts to manage the interactions over time within categorised collections of data and functions.
 
 
When designing applications or organisations for the nodal reduction environment, the idea is to describe as little as possible in terms of local data and functions, and as much as possible in terms of ''nodally-reducable'' structure, called ''[[Process|processes]]''. Nodal processes are totally reusable and independent of the target language, platform or OS-environment.
 
  
 
=== The Nodal Reduction Algorithm ===
 
=== The Nodal Reduction Algorithm ===

Revision as of 00:37, 27 August 2006

+Nodal Reduction/Summary

NOTE - this doc is still in brain-dump state :-)

See also


The Nodal Reduction Algorithm

The reduction algorithm divides available execution up into quanta which are considered as the indivisiable "atoms" of change. They have no definite rules about the amount of time they can take to execute, but should be generally infinitesimal compared to the macro scale. Any looping or iteration-based functionality should be implimented in terms of reducable structure (process). Top level nodal reduction is implimented as an infinite execute-quantum loop within the context of the Root node of the local Nodal Space.

Each node has both associative content and a possible local state. The associations are in the form of nodeRef:nodeRef pairs similar in concept to the key:value pairs of associative arrays, and the state is in a form specific to the local runtime environment (if there is no state, it will be returned as the local environments representation of null).

Using an association called Next, allows the formation of loops of nodes (singly-linked-circular lists) within the local Nodal Space. By combining this with another association called Now allows the formation of a loop-tree starting at the root node, where following the now association from root takes us down into another node, which is also part of a loop. Every traversal of a now takes us from an item in one loop to an item in another loop. The loop may contain zero items, but the idea here is that now's always connect items in loops, even though other associations may lead to other nodal structure which may or may not be a loop.

When a node receives a quantum of execution, it first checks if the state of the node is locally executable (e.g. it is a function reference), and if so it executes it and exits. That quantum is then considered consumed, and the next quantum is executed starting at the root node again. If the state is not executable, then the quantum is passed (execution is passed to) the node's now association. If there is no now association, the quantum is passed back to the root node unspent, but in practice this condition should not occur.

The process of traversing down a now association also involves an active (but reversable, cyclic and non-entropic) change to the structure. It involves following the now, then before beginning the quantum consumption phase, it gets the node-reference in the next association and overwrites the one in now of the parent (the one we just followed to get here). This means that the next time we follow that same now we will arrive at the next item in this loop. In other words, the nodal reduction process is rotating the loops in the tree, so that all of them will periodically get execution focus. The period is longer depending on the depth of the loop, since each node is effectively dividing its share of quanta between its currently active child processes.

Function execution & parameters

Currently the model is that an executing function binding can interact with the local global environment using either the languages own hash-table syntax as in nodal-wikid.pl, or using specific functions as in peer-nodal.as. Only the functional method is used now as in nodeSpace.c.

It seemed preferable to remove the concept of interfaces in order to give direct nodal access to the code, but wait states can occur in reads if they have to instantiate due to first-read which means that the function could easily take non-infinitesimal time to execute.

If we take a more UML/DOM-like approach we instead can nodally describe not only the OO and program flow control aspects, but also the function interfaces (names and entry/exit parameter lists). This means that the retrieval of the nodal information required to execute the function is being executed through nodal reduction.

The function itself executes after all information is present, and does not ever interact directly with the outside environment, so no nodal access syntax or functions are required.


NOTE: the diagram is rotating the wrong way - it should rotate clockwise so that next's are right and prev's left.

Nodalreduction-text.jpg

Wickerbasket-text.jpg