The KnownSpace Datamanager
"Halfway To Anywhere"


The KnownSpace Hydrogen API

This API lists four classes and seven interfaces, divided into seven main groups: entities, entity values, simpletons, pools, constraints, events, and exceptions. Entities store data and data relationships, entity values store or generate data, simpletons manipulate entities, pools store entities, and constraints describe entities.
Entity: holds values and links

EntityValue: produces data
PassiveEntityValue: holds data

ActiveEntityValue: creates data
Simpleton: manipulates entities

Pool: holds entities

Constraint: specifies sets of entities

Event: holds state change
EventGenerator: creates events

EventHandler: listens for events
Exception: holds execution failure

An Entity has three parts: a name, a value, and a set of links to other entities. Its name is a shorthand way to refer to it in constraints, events, and exceptions. Its value is what it stores. Its links specify what entities it has as attributes and what entities it is an attribute of.

Each link relates two entities, a base entity and an attribute entity. Any entity may be an attribute of any other entity. Which entity is the base and which is the attribute depends solely on the direction of the link (bases point to attributes). There is no other difference between a base entity and an attribute entity.

What entities an entity may or may not be linked to has no bearing on the value that entity stores. Any entity may be the value of any entity, but that won't establish a link between one entity and another.

Entities can have arbitrary persistent objects as values, but those objects' classes must implement the EntityValue interface. Stored entity values should implement the PassiveEntityValue interface. An entity can also have an ActiveEntityValue, a computation that generates new values dynamically. An active value may execute any computation whatsoever, just as a Simpleton can, except that it has no thread of its own. It will execute only when some simpleton requests its entity's value.

Simpletons and active entity values are together called actors. An actor can create entities, install and remove entity links, read and write entity values, and read and (on entity creation only) write an entity's name. Further, it can add entities to a Pool, remove them, and search a pool for entities. Currently, however, there is only one pool. An actor can search a pool for entities using Constraints, a simple query language; a constraint specifies a subset of entities.

An actor can delegate an EventHandler to listen for changes in any EventGenerator's state, by subscribing to a constraint-delimited set of DataManagerEvents generated by the event generator as it changes state. Events can be stored as entity values inside entities, which can be tossed into the pool and then listened for by any event handler. Currently, only pools and entities are event generators, but since generators and handlers are defined by interfaces, any class may also be a generator or handler (although generators currently require special kernel support, that is likely to change soon).

Finally, methods currently report errors through one catchall exception class, DataManagerException.

This API applies to all application code written for KnownSpace Hydrogen. It will be stable, or at least, backwardly compatible, from January 1, 2000 to December 31, 2000.

Entity API

EntityValue API

PassiveEntityValue API

Expanded PassiveEntityValue API.

ActiveEntityValue API

Simpleton API

Pool API

Constraint APIs

Expanded Constraint API.

EventHandler API

EventGenerator API

DataManagerEvent API

Expanded DataManagerEvent API.

DataManagerException API