Resoa Persistence - the Task object

Resoa Persistence internally uses Resoa Services for the Master/Slave management, declared within the resoa.persistence.xsd file.

The most important type for every persistent transaction is the Task.

Task type definition

The task object instance is created on the node, where the request initially arrived and processed due to the persistence policy rules. It contains a series of Instructions. A MASTER node first processes all declared locks, then checks for consistency restrictions and in case of no conflicts it finally performs the atomic executions to the physical storage.

Check the class PersistentTransaction, it offers functions for the automatic Task instance creation and execution. Within service programming you use the interface ResoaPersistence, implemented by Persistor.

Task objects are JSON serialized, encrypted and stored as a local Journal file. These Journals are deleted again, if the final processing to the persistent backend has succeeded.

Object relation types

Persistent relations are declared within the resoa.xml file of a persistent service domain. The following types are available:

The MASTERCOMMIT Policy

Use this policy for transactions, which must be executed by MASTER before a COMMIT is indicated to the request.
The final slave storage transactions happen with delay. Requests of type CREATE_NEW and tasks with relations of type LINK_INSIST are always executed under this Policy.

SLAVE request handling rules MASTER request handling rules Timeout management

The LOGILEPERSIST Policy

Use this policy when transaction speed is more important than grid synchronization speed. The request is committed, if SLAVE request handling rules MASTER request handling rules

Object inheritance

Let's assume you assigned a class org.foo.Course as persistent within resoa.xml, but your xsd defines another type org.foo.MathCourse, extending Course. MathCourse will be persistent as well without any further declarations in resoa.xml, all inherited types of a persistence type are persistent as well. The entityname, used within the Instruction structure, assign the real type of the stored record, it will be attached to the JSON root by the key class as well. This is essentially for unmarshalling, otherwise the system would cast your MathCourse instance to the wrong type Course.