User:Pitstarr/sandbox

GENERIC SYSTEM
Generic System is an innovative open source information engine implemented in Java and is at once persistent, transactional, concurrenciel and flexible. Generic System fits into the NoSQL databases ecosystem by implementing a full Object Logic and with no dependency to a relational database. Specifically, just a few lines are needed to build a full database.

Persistent
Generic System is running in memory and has its own persistence mechanism. At startup, the GS Engine retrieve the most recent archived image in a directory for this purpose and build the information system. Periodically GS creates images of the system that establishes a restore points. Finally, when the engine stops, it archives a final image of the system to stop time.

Transactional
Generic System is a transactional information system. The GS transaction can be compared to the relational database transaction. It can read, write, edit and delete data. All Writings are performed through a transaction which ensures they all run at the same time t. The internal design of Generic System ensures that any reading of an object or set of objects done at a time t is reproducible. This arrangement guarantees transaction isolation within the meaning of dirty reads, non-reproducible reads and phantom reads. For information, to improve system availability, Read operations have generally priority over Writing operations.

Concurrenciel
Generic System allows multiple work in parallel. Algorithms are based on those called MVCC (multi-version Concurrency Control). They provide to GS users correctly isolated transactions and perfectly coherent requested data.

Flexible
Generic System is recognized as highly restructurable as it provides the ability of changing the information structure in the same way that the information itself, i.e. transactional and concurrentiel. Thus and unlike relational databases, GS allows to change the information structure on the spot. A major shortcoming of relational databases is that the structure of the database is not treated in the same way that the data itself. It irremediably deteriorates the agility and evolutivity of applications by freezing the data structure on which they depend on. This alternative is inconsistent with the trend of modern application development methodologies  when specifications of a project have to evolve. Again, GS favors to address the information structure as any other information, ie transactional and concurrentiel, allowing great flexibility.

Representation Model
Generic System stores the information in a graph. It has a single root: the node representing Engine. The nodes in the graph are Objects that implement the interface Generic, including Engine. They have the characteristic of being immutable and have a simplified life cycle : they are born and can potentially die but never be modified.

Once instantiated, the nodes hold in one single data only. It plays a role of caregiver for information structure and a role of designated to occurrences of this instantiated information. For example, the name of a person is the designating, the person is the designated. This data must be Serializable and properly implement equals and hash-code. The nodes are interconnected by the principle “ancestors / dependencies” : the ancestors of a dependent node must exist throughout the life of this node.

Three types of binding ancestors / dependencies coexist in Generic System: the instantiation, the inheritance and the composition. Thus, a Generic has for his ancestors “meta”, his “great” and “components.

The binding of instantiation
The first binding is the instantiation. This binding connects a Generic to its meta or a Generic to its instances. The meta corresponds to the type of data, instances correspond to occurrences of this type. There are three levels of instantiation:
 * 1) Level “meta“: this is the level of meta data. Engine is a major constituent of this level. It is the access point of the  information lifeblood (or engine), the root of the graph and plays a special role. This is the meta type or type of types. Two other components of this level exist. MetaAttribute is the type of attributes and similarly MetaRelation is the type of relations.
 * 2) level “Structural“: it is the level where is represented the information structure (types, attributes, relations). The Generic watched there represent instances of the metas of meta level. They are similar to object language classes or relational database tables. They carry structural information, the value acts as designating.
 * 3) Level “concrete“: this is the level where is represented factual information (instances, holders, links). The Generic of this level are concrete information whose value plays a role of designated.
 * 1) Level “concrete“: this is the level where is represented factual information (instances, holders, links). The Generic of this level are concrete information whose value plays a role of designated.
 * 1) Level “concrete“: this is the level where is represented factual information (instances, holders, links). The Generic of this level are concrete information whose value plays a role of designated.

The binding of inheritance
The second binding is the inheritance. This binding connects a Generic to its supers or a Generic to its inheritings (heirs). The supers correspond to the types parents (called mother classes in object language), the inheritings correspond to the types children (called child classes in object language). A type can have a super (simple inheritance) as several supers (multiple inheritance). The supers of one type must always have the same level of instantiating as this type.

The binding of composition
The third binding is the composition. This binding links a Generic to its components (constituents, constituants or aggregated) or Generic to its composites (composed, constituted or aggregating). This binding example links one type to this type attribute.
 * 1) the Component: object that can be specialized into a page or a composite
 * 2) the Page: object being not composed
 * 3) the composite: object being composed of one or more components
 * 1) the composite: object being composed of one or more components
 * 1) the composite: object being composed of one or more components

A perfect example of a component / composite concept is the file system:
 * 1) the component is a file (in a broader sens). This can be a file or a directory.
 * 2) the page is the “normal” file (a file in the strict sense)
 * 3) the composite is the directory. This may be composed of files (in the strict sense) and / or other directories (subdirectories).

Two generalizations of the principle of composition are: allow the composition of n types: thereby forming n-ary relations. A binary relation corresponds to a relation between two types. A unary relation corresponds to a relation to one type: it is actually an attribute. An “empty” relation corresponds to a relation with zero type: it is actually a type.

Allow the composition of composition: which allows for example to represent the attribute of an attribute. Generic System can manage not only the n-ary relations but also the attributes of attributes.