New release of Dinemic framework is available – the 19.03, build 612. List of changes:
Multi/single chain support
With configuration variable CHAINS it is possible to change behavior of dinemic framework and force to use single chain for all objects. Possible values for this option are: single, multiple. With CHAINS: multiple, dinemic will create separate chain for each object mapped by this framework. With single chain all object changes will be appended to single chain. This may improve tracking changes in time. Multiple chains have no possibility to recreate database in newly attached nodes in proper order. All chains in multiple mode are processed independently.
Use random endpoints in ZeroMQSync driver and retransmit limits
Due to limiting number of endpoints, which are used to broadcast messages, version 19.03 introduces random selecting enpoints which should receive updates with ZeroMQ sync driver. Incrementing this value should improve cluster availability and failure-proofness.
New methods – manage update and read authorized keys by append and remove methods
Since version 19.03 it is possible to manage read_authorized_objects and update_authorized_objects with dedicated methods of DModel class. Primary purpose of this change is to force reencryption of all DFields and all DLists in DModel after adding or removing keys to/from read_authorized_objects. When new object is being authorized it was necessary to manually reassign values of all fields in object, to make them available for new object. After introducing this API it is made automatically each time this lists are changed.
Updated DAction filtering – wildcards are extended by [id] and [object] macros to make filters more simple and better to understand
When creating new actions it is possible to use new macros to match objects, ids or fields in filters, which defines when action should be executed:
- [id], [ID] – matches any ID in object ID string
- [obj], [object], [OBJ], [OBJECT] – matches any object with ID, like: Object:12345…
- [field], [list] – generates value_ and list_ strings, when update is related to certain fields of object
DModel has list of children by default
DModel has new DList, next to *_authorized_objects. This list is propagated automatically, when new child object is created by framework. Creating child object also invokes on_update and on_updated listeners on parent model, related to update of children DList.
Updated error and debug messages
Messages are now formated in color and some messages were moved from info to debug to improve clearness of logs. Also there is new macro ACTION, which should be used to log messages from DAction classes.
Default configuration file and keystore
This version introduces default location of system-wide configuration file for dinemic framework. In /etc/dinemic you can find config.dinemic file with default values of all config variables and keys keyring directory. All values could be overwritten by local configuration files pointed by DINEMIC_CONFIG environment vairable. Due to default keystore is owned by root after installation, it is necessary to launch dinemic applications as this user or to change ownership of this directory to unprivileged user, what is recommended.
Fixed decryption of empty strings in DModel, DList and DField
Some bugs were found since last relase, related to DModel field encryption. Framework was generating exception, when field had no encrypted data and one was trying to decrypt value.
Removed parent’s from get/set list* methods in DModel
API of DModel class was changed. Most methods related to data manipulation (set/get/list_append etc.) had parrent pointer, which was not used. Since this version it is removed.
get_parent and has_parent in DModel
To better handle parent and child objects in Dinemic above two methods were introduced in release 19.03. This methods allow to get parent object and check if there is parent class. This is especially important when one tries to make updates on parrent as non-default caller.