Tech/LxEngine/Architecture

The LxEngine application is composed of the following major concepts:

Overview


Persisted data is stored by the. At run-time, loaded data is organized into a which uses a  as the high-level organizational structure. Individual s in the document are placed into a hierarchy of s within the Space.

The Document is then presented to the user via a. The user interacts with the View itself as well as the underlying Document via a.

Engine
There is one and exactly one instance of an Engine object in an LxEngine application. This is the root from which all aspects of the LxEngine functionality ultimately can be reached.

Datasource
Provides a concise, perforce-like interface for serializing in and out named objects from file system or network source. It allows objects to be forked, locked, updated, reverted, tagged, etc.

Basic functionality:
 * Abstraction of the data source (file system, zip file, local database, network based, procedurally generated objects)
 * Abstraction of the data format (JSON, XML, binary, file formats and codecs, etc.)
 * Optional object metadata tracking (enforce a consistent interface across the data set)
 * Optional object permissions enforcement (ownership, sharing, locking, etc.)
 * Optional revision history (version control, forking, journal, etc.)
 * Optional transaction-based collaboration (change sets)
 * Optional indexing, caching, and paging

The engine is aware of one or more data sources.

Document
Represents a collection of runtime objects created from one or more data source objects.

A can be thought of a unified whole, whereas an  is an organizational structure within that whole (which likely does not make full sense in isolation) and an  is a concrete detail within the. The s within the can arranged into a particular kind of, depending on the most appropriate organizational strategy.

Note: s support embedding of other documents allowing arbitrarily complex data models.

Space
A document is composed of 1 or more s. The space defines the conceptual layout of the elements contained in the document: it defines the notion of adjacency between elements as well as the size of elements. Each in the  has one root element.

Example s would be an infinite 3D space, a bounded 3D space, an infinite 2D space, a paginated 2D space, a 1D overlapping timeline-based space, or a purely conceptual space (i.e. no real-world spatial analogy).

Element
A logical portion of a document representing one or more runtime objects. Elements may be nested into a heirachy. As general organizational structure, only objects in the same element can directly interact with each other and an element can only influence those objects within it or within one of its child elements.

Elements use a HTML DOM-like structure and allow for a CSS-like attribute inheritance between elements. Document Views can utilize this structure to stylize and transform the underlying data for a particular view.

Object
A run-time object in the LxEngine system. This is a generic, reference-counted object with interfaces to supports all basic LxEngine functionality. All persistent objects in the should use derive from this class. Transient (non-persistent) objects do not need to incur the slight overhead.

Note: since all persistent objects are encouraged to derive from this interface, the internal representation is careful to internally optimize for performance and size based on the actual use of the object in order to eliminate as much undue overhead as is possible.