View design document

The view is further detailed in FedoraViewBlobs. This document describes how the backend services should use to view to detect changes in records.

Changing an object and marking the view as updated

Whenever one of the components of a View is changed, the whole View count as updated. As such, any services that subscribe to the View in any way need to be notified. If there is a search index for the Views, and one is updated, its state in the index must be recomputed.

The problem arrives when trying to do this. The View system is designed to ease the computing of a View when knowing the Main object. The reverse is finding the Views, ie. the Main objects, that have this data object in their View. Rather than encoding this information in the model, we chose to keep an external record of all the views.

The external record will be SQL based, or something similar. It will have two tables. The first table, MAINS, will have the columns PID, changed and updated. The PID is the pid of a main object, changed is the timestamp the record was changed and updated is the time stamp the objects in the view was recomputed. The second table, OBJECTS, have just one column, PID, the PID of the object. Each entry in MAINS will have 1..* relations to entries in OBJECTS, and each entry in OBJECTS will have 1..* relations to entries in MAINS.

These lists will be made at one time, by computing the view of all main objects in Doms. All Main objects will have been found, and added to MAIN_OBJECTS. When appropriate changes are made to the objects in DOMS, the object in MAIN_OBJECTS will be marked as changed. Periodically, the View of changed main objects will be computed, and the VIEWS list will be updated, and the objects will be marked as not changed.

We expect to hook the fedora API-M functions directly, so that the updating of the VIEW lists are done without any user input.

There are several situations where the list will be used

View design document (last edited 2010-03-17 13:09:23 by localhost)