4.11. Versioning Service

The goal of the the versioning system is to provide facilities for versioning data objects. This involves recording information about changes made to the data in order to be able to:

  1. Roll back to an earlier point in a data object's history.

  2. Undelete a data object (corollary of ability to perform rollback).

  3. Compute the difference between any two versions of the data object.

To illustrate the last point, suppose you want to know the difference between the Jan 12 and Apr 19 versions of an article. The versioning service can tell you that the article's title changed from Ravioli is better than spaghetti to Macaroni is better than spaghetti, and its by-line changed from Guy Lewis Steel to Guy Lewis Steele, Jr.

The service does not provide redundant storage. If you delete the versioned article in a context where the versioning service is not available (either because it is turned off, or because you are manipulating the database directly through JDBC or command-line client), there is no way for the versioning service to restore it. It is not a substitute for regular database backups.

The service is provided transparently. There is very little that a developer has to do in order to make their data versioned. To gain conceptual understanding of the versioning service, one must be familiar with the key concepts of persistence: data objects and PDL (see Section 2.4 Persistence and Domain APIs (DataObject, DataAssociation, DataCollection, DomainObjects), Section 2.3 Persistence Definition Language (PDL)). For a more detailed explanation of versioning, please refer to Section 11.5 Versioning Tutorial.