Persistence services for MC-3020 are light weight and flexible in terms of non-volatile storage technology. The persistence services are broken between two domains, PERSIST and NVS.
The PERSIST domain performs the commit and restore operations which commit instances to non-volatile storage and restore instances from non-volatile storage respectively. The PERSIST domain keeps track of which instances have been persisted, which links have been persisted and manages keeping the links synchronized with the instances during the power-up system initialization.
The NVS domain supplies a rudimentary but functionally complete persistent data storage and retrieval interface. The interface has characteristics of both a database and of a file system. The interface is rich enough to provide flexibility in the application of different non-volatile storage technologies.
MC-3020 persistence does not specify or depend upon
a specific persistent storage technology. Therefore, only
a standard interface (bridge) is defined. The user may deploy
whatever available technology desired behind the bridge to
the NVS domain. A sample implementation is supplied (in a file
called sys_nvs.c/h
) for use
as the developer desires.
The domain chart below shows the bridge operations made
visible to the application. commit
is the primary function used by the application.
The architecture domain (MC-3020) automatically
performs the insert
s, update
s
and delete
s to shuffle instance data between the
RAM based collections of the application and the non-volatile
persistent storage. Additionally, MC-3020 automatically performs the
restore
operation at power-up time.
Other domain interfaces are exposed and may be used at the discretion of the analyst.
A manual commit occurs when the user
forces a commit of instance and link data to non-volatile store
by synchronously invoking a PERSIST domain function (e.g.
PERSIST::commit()
). An automatic
commit occurs when a commit is initiated by the software
architecture "behind the scenes" based on pre-defined policy.
MC-3020 supports manual commit operations and performs automatic commits when necessary. Such automatic commits occur when instance and link delete operations are required.
When persistence and tasking are both enabled in the generated system, MC-3020 performs all commits automatically. It is not advised to manually commit in a multi-tasking system.