From SystemsResearch

Jump to: navigation, search

Orthogonal Persistence

The persistence of data in a computer system is the length of time for which the data exists; this may range from the very short to the very long. Some examples at the extremes of the spectrum are the temporary data created during the evaluation of an expression in a program and the long-term data stored in a company's customer database. In the first case the data persists for a brief fraction of a single program execution, while in the second the data may outlive the programs that operate on it.

In an orthogonally persistent programming system, the manner in which data is manipulated is independent of its persistence. The same mechanisms operate on both short-term and long-term data, avoiding the traditional need for separate systems to control access to data of different degrees of longevity. Thus data may remain under the control of a single persistent programming system for its entire lifetime.

The principal gains provided by orthogonal persistence are:

  • Improved programming productivity from simpler semantics.
  • Without persistence, ad hoc arrangements for long term data storage, and data translations are necessary.
  • Type checking protection mechanisms operate over the whole environment.
  • Referential integrity is automatically supported.

In a non-persistent system, long-term data is stored in a database such as a file system or relational database. Programs operate on the data by reading it from the database, manipulating it in some way and writing it back to the database. Typically, the format of the data is translated to and from a richer programming language format as it is transferred between the database and programming language domains. The conceptual mappings that must be maintained and understood by the programmer are shown below:

The provision of a persistent language eliminates two of the three mappings since data retains its programming language format over its entire lifetime. This simplification is shown below:

Further benefits of orthogonal persistence are:

  • Programs such as procedures and modules can be represented by first class values which reside in the persistent store.
  • The persistence mechanism provides incremental loading.
  • The persistence mechanism provides linking via incremental data loading.
  • The persistence mechanism verifies type correctness of such linking.
  • The persistence mechanism supports incremental program construction and replacement.
  • The persistence mechanism provides program and data library management.

Further Information

Personal tools